1 Sep 2010 01:29
Re: failure to build due to ignoring fwrite() result
Bruno Haible <bruno <at> clisp.org>
2010-08-31 23:29:30 GMT
2010-08-31 23:29:30 GMT
Karl, all,
> <at> pindex lint
> ! Don't make the program ugly to placate <at> code{lint}. Please don't insert any
> ! casts to <at> code{void}. Zero without a cast is perfectly fine as a null
> ! pointer constant, except when calling a varargs function.
Here is a proposed wording that
- acknowledges the fact that there are different opinions among GNU
maintainers (Chet Ramey wants few warnings, I use just -Wall, Jim
uses also -Wshadow and some more, and Simon uses many more),
- nevertheless tries to give reasonable advice.
Paul's mention of valgrind is a good one, because just like some people
ask us to remove all warnings that occur with -Wundef, others ask to
free all memory before a program exits, as a way to placate valgrind.
At first I wanted to propose this new paragraph:
-------------------------------------------------------------------------
<at> cindex warnings, dealing with
<at> pindex gcc
<at> pindex valgrind
<at> pindex clang
<at> pindex lint
Don't make the program ugly just to placate warnings from tools other
than those that you use on a daily basis. <at> code{gcc}'s warnings,
<at> code{valgrind}'s memory leak checker, <at> code{clang}'s static analysis
facilities, and code style checkers like <at> code{lint} can be valuable
tools. But if you try to placate too many warnings, the readability
(Continue reading)
RSS Feed