On Mon, 26 Aug 2013 22:33:10 +0000, Nathan Hjelm said:
>Hmm, the conclusion is wrong. If ret > -1 the cached_device is always
>not NULL. I should probably change:
>
>if (ret < 0 || (cached_device && !cached_device->can_enumerate)) {
>
>to:
>
>if (ret < 0 || !cached_device->can_enumerate) {
>
>to reflect this.
That change would silence the warning, and is IMHO an appropriate fix if you're
100% sure that 'cached_device' can indeed never be null when ret >= 0.
I've stared at the code for a couple of seconds, and am not fully convinced
myself. After all, the very first thing darwin_get_cached_device() does is:
ret = 0;
*cached_out = NULL;
If those initial conditions are not changed (in some freaky branch) then the
quoted checks above are not equivalent. But I trust you know the code well!
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng [email protected]
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libusbx-devel