[Mesa-dev] [PATCH 3/4] freedreno/ir3: Add missing braces in initializer

Emil Velikov emil.l.velikov at gmail.com
Thu Jul 28 10:31:36 UTC 2016


On 28 July 2016 at 09:21, Eric Engestrom <eric.engestrom at imgtec.com> wrote:
> On Wed, Jul 27, 2016 at 07:37:56PM +0200, Francesco Ansanelli wrote:
>> Hello,
>>
>> unluckily this didn't fix the warning...
>> I've done some more compile testing and found this solution:
>>
>> - static struct ir3_shader_key key = {{0}};
>> +static struct ir3_shader_key key = {{{0, 0, 0, 0, 0, 0, 0, 0}}, 0, 0, 0,
>> 0, 0, 0, 0, 0};
>
> So there are 3 levels of structs? The proper fix IMHO should then be
> {{{0}}}, as the rest of the 0's are implied.
> Can you test if that fixes it?
>
The original code is perfect (follows the spec) as-is. There's been a
number of gcc bugs on the topic, hence why sometimes people prefer
memset.
Which one people will opt for is quite subjective but I'd rather leave
the call to Rob.

-Emil


More information about the mesa-dev mailing list