Re: [PATCH] avoid warnings about initialization of automatic aggregates
From:
Pádraig Brady
Subject:
Re: [PATCH] avoid warnings about initialization of automatic aggregates
Date:
Tue, 2 Dec 2008 10:08:15 +0000
User-agent:
Thunderbird 2.0.0.6 (X11/20071008)
Jim Meyering wrote:
> Only the temporary is static.
>
> The original code (that evokes a warning) is like this:
>
> mbstate_t mbstate = { 0, };
>
> Using DECLARE_ZEROED_AGGREGATE, it's like this (modulo formatting onto
> two lines and the approximate line number)
>
> static mbstate_t s0_3724;
> mbstate_t mbstate = s0_3724;
>
> I considered using memset, but preferred the above.
> So I think we're ok.
Ah Ok. Sorry for the noise.
Pádraig.