On Mar 21, 2014, at 12:50 PM, Sean McBride <s...@rogue-research.com> wrote:

On Fri, 21 Mar 2014 18:44:01 +0000, Nathan Hjelm said:

       >I can't get scan-build to give me the the first one

It's a compiler warning, not a static analyzer warning. I get it just building with Xcode 5.0.2. Again, I think last line of the function is returning entirely the wrong thing. Shouldn't it return 'ret' not 'len'? The docs for 'get_config_descriptor' say 'Return 0 on success or a LIBUSB_ERROR code on failure.'
 
We should probably update the documentation for the internal call. Both the darwin and linux backends return the length actually read. The code calling get_config_descriptor also assumes the returned value is the length. I will push an update to the documentation and fix the warning.


       >but I do get the
       >second one. The second one is an interesting flow and will take some
       >thought to see if it identifies a real issue or not.

Agreed, it's not at all clear to me either. The analyzer sometimes catches amazing things and sometimes is amazingly wrong. Thanks for looking into it.
 
No problem. I hope to have a determination on whether this is a bug later today.

-Nathan
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to