0.4 Clang compile warnings could lead to bugs
0.4 Clang compile warnings could lead to bugs
As you guys probably know already, I compile my 0.4 client with LLVM/Clang. IMO, it generates better warnings than GCC, of which there is a lot. I'm not proficient enough in C++ to fix them all and I know that you guys are busy, however I recommend fixing the warnings (most are small issues) as this could, potentially, help with fixing bugs.
Playing since December 2006
Re: 0.4 Clang compile warnings could lead to bugs
Yeah, in active development, I'm a "no warnings tolerated" guy. I usually compile with warnings as errors. And since I'm also on clang on MacOS from time to time, those will get fixed eventually. The ones I have seen are easy to fix and sensible.
Edit: Oh! They're not all as harmless as I thought. It spots this:
Similar ones bit us hard when gcc decided that yeah, this would be undefined behavior if widget_ptr was null, which can't be, so widget_ptr can't be null, so this is always considered true. The code in the if block would not crash here, just do something wrong; spam warnings and leave the cockpit empty, looks like it.
I guess that is now my next job.
Edit: Oh! They're not all as harmless as I thought. It spots this:
Code: Select all
if(&*widget_ptr == 0)
I guess that is now my next job.
Re: 0.4 Clang compile warnings could lead to bugs
Good luck with it and, as always, thanks for putting in the time and effort!
Playing since December 2006