<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 18, 2015 at 1:40 AM, Dmitry Vyukov <span dir="ltr"><<a href="mailto:dvyukov@google.com" target="_blank">dvyukov@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Added -Wno-maybe-uninitialized to mingw gcc flags and reverted the =0:<br></blockquote><div><br>Awesome - thanks!<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="http://llvm.org/viewvc/llvm-project?view=revision&revision=229657" target="_blank">http://llvm.org/viewvc/llvm-project?view=revision&revision=229657</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, Feb 18, 2015 at 10:29 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
> well the one you quoted in the commit message is actually a GCC (mingw) one,<br>
> which I think we've tried to disable (should be disabled with<br>
> -Wno-maybe-uninitialized). Clang has a better version<br>
> -Wsometimes-uninitialized anyway.<br>
><br>
> As for disabling MSVC warnings... I'm sure we have a few disabled *tries to<br>
> find them* Nope, don't recall where they are.<br>
><br>
> On Tue, Feb 17, 2015 at 11:20 PM, Dmitry Vyukov <<a href="mailto:dvyukov@google.com">dvyukov@google.com</a>> wrote:<br>
>><br>
>> On Wed, Feb 18, 2015 at 10:17 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>><br>
>> wrote:<br>
>> ><br>
>> ><br>
>> > On Tue, Feb 17, 2015 at 11:16 PM, Dmitry Vyukov <<a href="mailto:dvyukov@google.com">dvyukov@google.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> On Tue, Feb 17, 2015 at 9:57 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>><br>
>> >> wrote:<br>
>> >> ><br>
>> >> ><br>
>> >> > On Mon, Feb 16, 2015 at 5:53 AM, Dmitry Vyukov <<a href="mailto:dvyukov@google.com">dvyukov@google.com</a>><br>
>> >> > wrote:<br>
>> >> >><br>
>> >> >> Author: dvyukov<br>
>> >> >> Date: Mon Feb 16 07:53:00 2015<br>
>> >> >> New Revision: 229392<br>
>> >> >><br>
>> >> >> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=229392&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=229392&view=rev</a><br>
>> >> >> Log:<br>
>> >> >> tsan: fix compiler warning<br>
>> >> >><br>
>> >> >> mingw gcc complains:<br>
>> >> >> warning: 'err' may be used uninitialized in this function<br>
>> >> >> [-Wmaybe-uninitialized]<br>
>> >> >>        Printf("Failed to read options from '%s': error %d\n", value,<br>
>> >> >> err);<br>
>> >> ><br>
>> >> ><br>
>> >> > Was the warning correct? Or could we be sure that ReadFileToBuffer<br>
>> >> > would<br>
>> >> > initialize 'err'?<br>
>> >> ><br>
>> >> > Generally we should try not to unnecessarily initialize variables<br>
>> >> > just<br>
>> >> > to<br>
>> >> > satisfy warnings because it hurts sanitizers (though I suppose that<br>
>> >> > argument<br>
>> >> > doesn't apply to the sanitizer libraries themselves - it still seems<br>
>> >> > like a<br>
>> >> > good principle to apply)<br>
>> >><br>
>> >> I guess it is as incorrect as most of C++ compiler warnings.<br>
>> >><br>
>> >> This happened on windows, where you usually don't have a great choice<br>
>> >> of host compilers. So I am not sure how else we can resolve it.<br>
>> ><br>
>> ><br>
>> > We simply disable the warnings, don't have to switch host compilers - we<br>
>> > have a bunch of MSVC warnings disabled in our build configs already, I<br>
>> > believe.<br>
>><br>
>><br>
>> MSVC has own set of weird warnings. But do you disable such<br>
>> fundamental warnings as "potentially unint var"?<br>
><br>
><br>
</div></div></blockquote></div><br></div></div>