From 95bbfb6023877ca25720f04203ef2aa2f691e995 Mon Sep 17 00:00:00 2001 From: Chris Dickens Date: Mon, 30 Mar 2020 12:38:47 -0700 Subject: 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 --- libusb/os/poll_windows.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libusb/os/poll_windows.c') 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); -- cgit v1.2.1