Sean McBride
2014-01-20 18:59:13 UTC
Hi all,
With 1.0.18 coming, I though I'd try building git master with the latest Xcode. I see 3 warnings:
(1) core.c:1910:27: Missing field 'tv_usec' initializer
can we just change:
struct timeval tv = { 0, };
to:
struct timeval tv = { 0, 0 };
is there any platform where this struct is not 2 elements?
(2) os/darwin_usb.c:531:10: Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int'
A cast would silence this, but actually I worry the 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.'
(3) core.c:1163:7: Use of memory after it is freed
This could be a false positive as it's from the static analyzer. It's code path dependant, and really you need the Xcode GUI to follow the flow. Nathan, could you look?
Cheers,
With 1.0.18 coming, I though I'd try building git master with the latest Xcode. I see 3 warnings:
(1) core.c:1910:27: Missing field 'tv_usec' initializer
can we just change:
struct timeval tv = { 0, };
to:
struct timeval tv = { 0, 0 };
is there any platform where this struct is not 2 elements?
(2) os/darwin_usb.c:531:10: Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int'
A cast would silence this, but actually I worry the 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.'
(3) core.c:1163:7: Use of memory after it is freed
This could be a false positive as it's from the static analyzer. It's code path dependant, and really you need the Xcode GUI to follow the flow. Nathan, could you look?
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng ***@rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
____________________________________________________________
Sean McBride, B. Eng ***@rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada