Hello,

I installed MinGW on Debian. And the compiler reported warnings and
potential bugs.
I fixed most of the warnings. See the pull request [1].

The remaining warnings are:
../../libusb/os/windows_usb.c: In function 'windows_init':
../../libusb/os/windows_usb.c:879:18: warning: cast from function call
of type 'uintptr_t' to non-matching type 'void *'
[-Wbad-function-cast]

../../libusb/os/windows_usb.c: In function 'windows_get_device_list':
../../libusb/os/windows_usb.c:1318:2: warning: missing initializer
[-Wmissing-field-initializers]
../../libusb/os/windows_usb.c:1318:2: warning: (near initialization
for 'dev_info_data.ClassGuid') [-Wmissing-field-initializers]

The line
        SP_DEVINFO_DATA dev_info_data = { 0 };
may be missing some initializers

../../libusb/os/windows_usb.c: In function 'winusbx_claim_interface':
../../libusb/os/windows_usb.c:376:30: warning: 'dev_info' may be used
uninitialized in this function [-Wuninitialized]
../../libusb/os/windows_usb.c:2672:11: note: 'dev_info' was declared here

This may be a real bug.
dev_info is set only if (_index <= 0) in the previous lines.
Maybe a else statement is missing?

../../libusb/os/threads_windows.c:137:1: warning: '__inline' is not at
beginning of declaration [-Wold-style-declaration]

../../libusb/os/threads_windows.c: In function 'usbi_cond_timedwait':
../../libusb/os/threads_windows.c:190:2: warning: nested extern
declaration of 'epoch_time' [-Wnested-externs]

Bye

[1] https://github.com/libusbx/libusbx/pull/86

-- 
 Dr. Ludovic Rousseau

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to