Good job, but there are some warnings from MSVC v16 when I'm
using '-Wp64' in my CFLAGS. "enable 64 bit porting warnings".
I'm on a 32-bit WIndows:
libusb/core.c(692) : warning C4267: '=' : conversion from 'size_t' to
'ssize_t', possible loss of data
libusb/os/windows_usb.c(173) : warning C4267: '=' : conversion from 'size_t' to
'ssize_t', possible loss of data
I'm not sure these matters.
Also (maybe more serious). If I build a debug-version with '-RTCc'
("Convert to smaller type checks"), line 1117 in libusb/os/windows_usb.c
triggers a runtime-check since the line:
priv->depth = parent_priv->depth + 1
could possibly overflow (acording to the compiler at least).
This patch fixed it. But again, I'm not sure it matters:
--- Git-latest/libusb/os/windows_usb.c 2013-08-28 19:13:58 +0000
+++ libusb/os/windows_usb.c 2013-08-30 16:14:29 +0000
@@ -1114,7 +1114,7 @@
dev->bus_number = parent_dev->bus_number;
priv->port = port_number;
dev->port_number = port_number;
- priv->depth = parent_priv->depth + 1;
+ priv->depth = 0xff & (parent_priv->depth + 1);
priv->parent_dev = parent_dev;
dev->parent_dev = libusb_ref_device(parent_dev);
--gv
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libusbx-devel