[Mesa-dev] [PATCH 11/19] anv: Use GNU C empty brace initializer

Eric Engestrom eric at engestrom.ch
Tue Aug 29 17:33:00 UTC 2017


On 29 August 2017 18:11:45 BST, Matt Turner <mattst88 at gmail.com> wrote:
> On Tue, Aug 29, 2017 at 3:11 AM, Eric Engestrom
> <eric.engestrom at imgtec.com> wrote:
> > On Monday, 2017-08-28 14:57:13 -0700, Matt Turner wrote:
> >> Avoids Clang's warning about the current code:
> >>
> >>    warning: suggest braces around initialization of subobject
> >
> > I'm not sure about this patch [1], but everything else in this
> series is:
> > Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
> >
> > The "mark `UNUSED` because they are unused in some generations"
> patches
> > might be better to mark as `MAYBE_UNUSED`; they both resolve to the
> same
> > thing for compilers, but the latter is gives more information to
> humans
> > (ie. "this isn't always unused").
> >
> > [1]
> > Can you test this with GCC 4.x and 7.x? If memory serves, this init
> format
> > caused warnings on either old GCC or new GCC.
> > I think `= {{0}};` was the only format that both compilers were
> happy with.
> 
> Tested 4.9.4 and 7.1.0. No warnings from either of them about these
> initializers :)

Given this and Emil's comment, this patch is r-b me with the rest of the series :)


More information about the mesa-dev mailing list