<div dir="ltr">On Tue, Feb 26, 2013 at 3:50 PM, Eli Bendersky <span dir="ltr"><<a href="mailto:eliben@google.com" target="_blank" class="cremed">eliben@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=176134&view=rev" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project?rev=176134&view=rev</a><br>


>> Log:<br>
>> Try to get rid of a -wunitialized warning: explicitly initialize the<br>
>> pointer<br>
>> to NULL and use asserts to check in relevant places.<br>
><br>
><br>
> I assume GCC's -Wuninitialized?<br>
><br>
> I thought we turned that off due to the false positives like this.<br>
><br>
<br>
</div>Yes, gcc 4.6.3. This is after a vanilla cmake+ninja configure and build.<br>
<div><br>
> I'm really opposed to littering the code with dead stores to placate this<br>
> warning. It undermines our ability to use Valgrind to catch actual<br>
> uninitialized bugs.<br>
<br>
</div>In this case I initialized the pointer to NULL and added asserts, so<br>
hopefully any real mis-usage will be detected easily?<br></blockquote><div><br></div><div>Until someone else fails to add the assert.</div><div><br></div><div style>I'd rather have a consistent practice here.</div></div>
</div></div>