Daniel Holbert writes: > On 02/27/2014 10:26 AM, Zack Weinberg wrote: >> Does that mean a patch to squelch the uninitialized variable >> warnings in layout will now be accepted? Those are the only >> warnings in layout on my (Linux, debug) builds. >> >>> layout/base/FrameLayerBuilder.cpp:3462:56 >>> [-Wmaybe-uninitialized] ?last? may be used uninitialized in this >>> function > > If there's no perf impact, then probably, for at least some of them! > > The merits of maybe-uninitialized warning-fixes can vary on a > case-by-case basis, because in some cases, it's just a false positive > and the only way to "fix" it has a (small) perf cost. (which is why we > don't treat it as an error in warnings-as-errors builds)
More that just a perf cost. Explicitly initializing variables to garbage can hide real bugs from tools such as valgrind if they really are never set correctly later. Treating these as warnings, not errors, is probably the best thing here. If you see the warning and you've recently changed that code, then check it. If you haven't, you see the "may be" and ignore it. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform