<html><head></head><body><div>On Tue, 2015-12-15 at 22:44 -0800, Jason Ekstrand wrote:</div><blockquote type="cite"><p dir="ltr">On Dec 14, 2015 3:34 PM, "Ian Romanick" <<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>> wrote:<br>
><br>
> From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
><br>
> nir/nir.h: In function 'nir_src_for_ssa':<br>
> nir/nir.h:552:4: warning: missing initializer for field 'use_link' of 'nir_src'<br>
> [-Wmissing-field-initializers]<br>
> nir_src src = NIR_SRC_INIT;<br>
> ^<br>
> In file included from nir/nir.c:28:0:<br>
> nir/nir.h:508:21: note: 'use_link' declared here<br>
> struct list_head use_link;<br>
> ^<br>
><br>
> Number of total warnings in my build reduced from 2329 to 1932<br>
> (reduction of 397).</p>
<p dir="ltr">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. </p></blockquote><div><br></div><div>Just on this I build without adding extra warning flag and seem to be seeing issues that no-one else is, either that or people are ignoring warnings when pushing code and not fixing it after.</div><div><br></div><div>I fixed 4b9a79b7b813b the other day after the warning seemed to have been around for a couple of weeks.</div><div><br></div><div>I pulled this morning and now I have this in nir:</div><div><br></div><div>brw_vue_map.c: In function 'brw_print_vue_map':</div><div>brw_vue_map.c:260:20: warning: array subscript is above array bounds [-Warray-bounds]</div><div> return brw_names[slot - VARYING_SLOT_MAX];</div><div><br></div><div>And this in GLSL IR:</div><div><br></div><div>lower_buffer_access.cpp: In member function 'bool lower_buffer_access::lower_buffer_access::is_dereferenced_thing_row_major(const ir_rvalue*)':</div><div>lower_buffer_access.cpp:286:26: warning: unused variable 'var' [-Wunused-variable]</div><div> ir_variable *var = deref->variable_referenced();</div><div><br></div><table summary="commit info" class="commit-info"><tbody><tr><th></th><td colspan="2" class="sha1"><br></td></tr></tbody></table><div>I'm using gcc 5.3.1 and running Fedora if it makes any difference. </div><div><br></div><blockquote type="cite"><p dir="ltr"> What utility does building with -wextra actually provide?</p>
<p dir="ltr">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.</p>
<p dir="ltr">--Jason</p>
<pre>_______________________________________________
mesa-dev mailing list
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a>
</pre></blockquote></body></html>