[Mesa-dev] [PATCH 1/8] nir: Silence missing field initializer warnings for nir_src

Jason Ekstrand jason at jlekstrand.net
Tue Dec 15 22:44:29 PST 2015


On Dec 14, 2015 3:34 PM, "Ian Romanick" <idr at freedesktop.org> wrote:
>
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> nir/nir.h: In function 'nir_src_for_ssa':
> nir/nir.h:552:4: warning: missing initializer for field 'use_link' of
'nir_src'
> [-Wmissing-field-initializers]
>     nir_src src = NIR_SRC_INIT;
>     ^
> In file included from nir/nir.c:28:0:
> nir/nir.h:508:21: note: 'use_link' declared here
>     struct list_head use_link;
>                      ^
>
> Number of total warnings in my build reduced from 2329 to 1932
> (reduction of 397).

Is there some reason why you're building with extra warnings?  Last I
looked, all of NIR compiles with zero warnings with default flags so the
"removes compiler warnings" argument falls flat when the code is perfectly
well-defined.  What utility does building with -wextra actually provide?

If this serves no purpose other than alleviating your personal annoyance
with your preferred extra flags, then I'm going to have to nak it.  I'm not
being territorial, I just don't see any point in adding complexity for the
sake of -wextra.

--Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151215/e5ef9b46/attachment.html>


More information about the mesa-dev mailing list