[Mesa-dev] [PATCH 03/12] rbug: Silence warning

Jakob Bornecrantz wallbraker at gmail.com
Mon Jan 9 17:40:57 PST 2012


On Tue, Jan 10, 2012 at 12:01 AM, Alan Coopersmith
<alan.coopersmith at oracle.com> wrote:
> On 01/ 9/12 02:53 PM, Jakob Bornecrantz wrote:
>>
>> -   struct pipe_shader_state pss = { 0 };
>> +   struct pipe_shader_state pss;
>> +   memset(&pss, 0, sizeof(pss));
>
>
> Those do the same thing, just via a function call instead of compiler
> builtin.
> What warning is being silenced by that change?

I don't have the build log with me right, but I think it was something
about uninitialized field near "pss.tokens = tokens;", I will take a
closer look. That struct has substruct it seems that GCC wants you to
initialize all of them.

Cheers, Jakob.


More information about the mesa-dev mailing list