lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] API change: restructuring ipv4/ipv6 integration (task #


From: Simon Goldschmidt
Subject: Re: [lwip-devel] API change: restructuring ipv4/ipv6 integration (task #12722)
Date: Fri, 10 Apr 2015 07:29:11 +0200

Sylvain Rochet wrote:
> Unfortunately, we are now hitting GCC bug #53119 [1][2][3].
>
> lwip/src/core/ipv4/ip4_addr.c:53:3: warning: missing braces around 
> initializer [-Wmissing-braces]
> }, IPADDR_TYPE_V4
> ^
> lwip/src/core/ipv4/ip4_addr.c:53:3: warning: (near initialization for 
> ‘ip_addr_any.addr.ip4’) [-Wmissing-braces]
> [..]
> Adding an extra brace level shut up the compiler warning, does it still
> work for all compilers ?

I think it should. Seems like I just got the initializer wrong and MSVC doesn't 
care :-(
Anyway, that GCC bug seems to be a bit different in that the generic short-zero 
initializer '{0}' doesn't work. But except for 'ip_addr_any', we initialize to 
non-zero, so that's something different.

Reading about this makes me think the order of ip4/ip6 in the ip_addr_t union 
needs to be changed to allow constant initialization of the larger ip6 part...


Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]