[Mesa-dev] [PATCH 2/4] nouveau/compiler: init the size and code variables to NULL/0

Eirik Byrkjeflot Anonsen eirik at eirikba.org
Fri Jun 5 23:50:58 PDT 2015

Ilia Mirkin <imirkin at alum.mit.edu> writes:

> Sure. Fix it in GCC :) disable the bogus warning, whatever. I really really
> hate pandering to broken tools, sending the message that it's ok for the
> tools to be broken.

While I largely agree with the sentiment, I'm not sure I agree with what
is a "broken tool". If a tool regularly catches real, nasty bugs and
"fixing" the false positives have negligible cost, then I don't consider
the tool broken. When it comes to the warning about uninitialized data,
that seems to me a typical case of this.

I haven't actually looked at the code in question, so maybe it is really
painfully obvious that the uninitialized data would never be used. But
even so, I think initializing variables is almost always "negligible
cost", and I suspect this warning will often find real bugs that can be
really hard to track down.

The other warning about the ambiguity of "!a==b" I'm more doubtful


> On Jun 5, 2015 5:20 PM, "Martin Peres" <martin.peres at linux.intel.com> wrote:
>> On 05/06/15 17:12, Ilia Mirkin wrote:
>>> But if codegen fails, the code is never displayed as I recall. Again,
>>> this I'd going from memory...
>> Good memory. It looks ugly though.
>> In general, I would still want to fix the warning because I hate needing
>> to revert my patches to check if I introduced warnings or not. In this
>> particular case it is probably OK because no-one will likely touch this
>> file for the foreseeable future :)
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

More information about the mesa-dev mailing list