diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-03-30 12:38:47 -0700 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2020-03-30 12:38:47 -0700 |
commit | 95bbfb6023877ca25720f04203ef2aa2f691e995 (patch) | |
tree | 66fab38659c1b0a9cbc3d4ae85b6f5cf3ce79c44 /libusb/os/poll_windows.c | |
parent | 9a1bc8cafb904c20a869c74ad6d657686a1c4bb1 (diff) | |
download | libusb-95bbfb6023877ca25720f04203ef2aa2f691e995.tar.gz |
build: Enable additional build errors and warnings
Help catch more errors by enabling additional build errors and warnings.
Address some of the warnings seen with these new flags, including moving
the libusb_transfer structure back out of the usbi_transfer structure to
address 'warning: invalid use of structure with flexible array member'.
Apparently a structure ending with a flexible array member is not okay
with the compiler as the last member within another structure.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'libusb/os/poll_windows.c')
-rw-r--r-- | libusb/os/poll_windows.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libusb/os/poll_windows.c b/libusb/os/poll_windows.c index 490ee7f..5497088 100644 --- a/libusb/os/poll_windows.c +++ b/libusb/os/poll_windows.c @@ -222,7 +222,7 @@ static DWORD WINAPI WaitThread(LPVOID lpParam) DWORD status; status = WaitForMultipleObjects(thread_data->num_handles, thread_data->handles, FALSE, INFINITE); - if ((status >= WAIT_OBJECT_0) && (status < (WAIT_OBJECT_0 + thread_data->num_handles))) { + if (status < (WAIT_OBJECT_0 + thread_data->num_handles)) { if (status > WAIT_OBJECT_0) { // This will wake up all the other waiting threads SetEvent(notify_event); @@ -291,7 +291,7 @@ static DWORD poll_wait(const HANDLE *wait_handles, DWORD num_wait_handles, DWORD } status = WaitForMultipleObjects(MAXIMUM_WAIT_OBJECTS, handles, FALSE, timeout); - if ((status >= WAIT_OBJECT_0) && (status < (WAIT_OBJECT_0 + MAXIMUM_WAIT_OBJECTS))) { + if (status < (WAIT_OBJECT_0 + MAXIMUM_WAIT_OBJECTS)) { if (status > WAIT_OBJECT_0) { // Wake up all the waiting threads SetEvent(notify_event); |