> On Jan 20, 2014, at 4:56 PM, Tim Roberts <t...@probo.com> wrote:
> 
> Sean McBride wrote:
>> 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?
> 
> Even if there isn't, the standard guarantees that those two constructs
> are identical.  Any elements that don't have initializer values get zeroed.

Not quite. This is true for global/static variables. Anything allocated on the 
stack that is not explicitly initialized gets whatever was on already the stack.

> In other places (see line 2156), the code assumes that the structure
> contains tv_sec and tv_usec, so there must be at least two elements. 
> Thus, your change is safe, although superfluous.
> 
> -- 
> Tim Roberts, t...@probo.com
> Providenza & Boekelheide, Inc.
> 
> 
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today. 
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> libusbx-devel mailing list
> libusbx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusbx-devel

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to