[Maria-developers] Buildbot and compiler warnings
I have now implemented and installed in our Buildbot enhanced facilities for dealing with compiler warnings. We already have a file support-files/compiler_warnings.supp, which I think is used by PushBuild @ MySQL. The new facilities in our Buildbot uses the same file to suppress certain warnings that for some reason cannot be removed or are not desirable to remove. See for example: https://askmonty.org/buildbot/waterfall?branch=5.1 https://askmonty.org/buildbot/builders/hardy-amd64-valgrind/builds/113/steps... So there are still a few warnings that need to be eliminated, patches welcome :-) Note that old builds from earlier than today still have the old log files, without these new warning facilities. Would be great to get us to compile without any warnings. The Drizzle people already compile with -pedantic -Werror, so we are trailing behind there! - Kristian.
Hi, Kristian! On Aug 11, Kristian Nielsen wrote:
I have now implemented and installed in our Buildbot enhanced facilities for dealing with compiler warnings.
We already have a file support-files/compiler_warnings.supp, which I think is used by PushBuild @ MySQL. The new facilities in our Buildbot uses the same file to suppress certain warnings that for some reason cannot be removed or are not desirable to remove.
See for example:
https://askmonty.org/buildbot/waterfall?branch=5.1 https://askmonty.org/buildbot/builders/hardy-amd64-valgrind/builds/113/steps...
So there are still a few warnings that need to be eliminated, patches welcome :-)
Note that old builds from earlier than today still have the old log files, without these new warning facilities.
Would be great to get us to compile without any warnings. The Drizzle people already compile with -pedantic -Werror, so we are trailing behind there!
Just to make a statement (and not to start a flame war:) - I strongly believe that "zero warnings at the highest warning level" is a very silly goal to strive for. Well, if one's really bored and have nothing else to do... Regards / Mit vielen Grüßen, Sergei -- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@sun.com> / /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect /_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028 <___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel Vorsitzender des Aufsichtsrates: Martin Häring
On Tue, Aug 11, 2009 at 7:27 PM, Sergei Golubchik<sergii@pisem.net> wrote:
Would be great to get us to compile without any warnings. The Drizzle people already compile with -pedantic -Werror, so we are trailing behind there!
Just to make a statement (and not to start a flame war:) - I strongly believe that "zero warnings at the highest warning level" is a very silly goal to strive for. Well, if one's really bored and have nothing else to do...
Well, if I started a new project from scratch, it sounds to me like a reasonable "coding guideline" to follow. Of course, with new compilers on new platforms you could run into new warnings, but that could be seen as a good thing and opportunity for improvement. In an old codebase with warnings already there... yes, we probably have more important things to do. It doesn't mean it's a silly goal, just that we realistically will not be working on it. Then again, this is an Open Source project. Removing warnings and other cleanup tasks are actually good activities for someone to get into MariaDB development. There's still some overhead for the captains to mentor and review that work, but that much we should be able to spend on such activities, if there really was someone doing it. henrik -- email: henrik.ingo@avoinelama.fi tel: +358-40-5697354 www: www.avoinelama.fi/~hingo book: www.openlife.cc
Hi, Henrik! On Aug 11, Henrik Ingo wrote:
On Tue, Aug 11, 2009 at 7:27 PM, Sergei Golubchik<sergii@pisem.net> wrote:
Would be great to get us to compile without any warnings. The Drizzle people already compile with -pedantic -Werror, so we are trailing behind there!
Just to make a statement (and not to start a flame war:) - I strongly believe that "zero warnings at the highest warning level" is a very silly goal to strive for. Well, if one's really bored and have nothing else to do...
Well, if I started a new project from scratch, it sounds to me like a reasonable "coding guideline" to follow. Of course, with new compilers on new platforms you could run into new warnings, but that could be seen as a good thing and opportunity for improvement.
Not at all. I should've provided an example in my first email. How about a "letter 'o' frequency" to "letter 'a' frequency" closer to 1.618, the golden ratio. Is it a reasonable coding guideline to follow ? What if you started a new project ? There are certain warnings and classes of warnings that I don't want to see in the code, right. But there are many others - fixing them only obfuscates the code, adds ugly hacks (and long comments /* we have to do it this way bla-bla-bla otherwise gcc complains that bla-bla-bla */). And, true, fixing warnings may also uncover bugs behind them - but if I'll have time to waste I'd better go to Vegas, I'll have better chances there anyway. Again, to avoid misunderstandings, I'm not against fixing warnings :) I just don't like absolute rules. "Joins are slow", "no mutexes in the code", "zero warnings when all -W* are enabled", and so on. Regards / Mit vielen Grüßen, Sergei -- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@sun.com> / /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect /_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028 <___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel Vorsitzender des Aufsichtsrates: Martin Häring
On Wednesday 12 August 2009 07:26:18 Sergei Golubchik wrote:
[...] There are certain warnings and classes of warnings that I don't want to see in the code, right. But there are many others - fixing them only obfuscates the code, adds ugly hacks (and long comments /* we have to do it this way bla-bla-bla otherwise gcc complains that bla-bla-bla */). And, true, fixing warnings may also uncover bugs behind them - but if I'll have time to waste I'd better go to Vegas, I'll have better chances there anyway.
Again, to avoid misunderstandings, I'm not against fixing warnings :) I just don't like absolute rules. "Joins are slow", "no mutexes in the code", "zero warnings when all -W* are enabled", and so on.
To me, the cost of warnings isn't only about the problem they might tell something about. It is that we miss the new ones that tell about real problems. When I have worked on projects that have many warnings, it's impossible to find new ones I introduce. So noone cares about warnings at all. After working many years on code to be compiled by many different compilers, it's always been my completely firm rule never to allow compiler warnings. There are indeed places where I have had to introduce the "shut-up-silly- compiler-warnings-code", but it's maybe one or two places per project. And in my experience, most compiler warnings either point to real potential problems in the code (possibly maintenance problems instead of errors) or something that other compilers will treat as errors. -Wall -pedantic -Werror are good gcc flags. Some projects can add -Weffc++ for c++ code, but I have had mixed results with that - too many bad warnings for my taste. Bo.
participants (4)
-
Bo Thorsen
-
Henrik Ingo
-
Kristian Nielsen
-
Sergei Golubchik