svn commit: r274340 - in head/sys: crypto/rijndael dev/random geom/bde

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Nov 14 12:44:38 UTC 2014


--------
In message <20141114131512.C1552 at besplex.bde.org>, Bruce Evans writes:

>I also doing like the error for:
>
>int
>foo(bar_t b)
>{
> 	if (b < 0)
> 		return (EINVAL);
> 	...
>}
>
>where bar_t happens to an unsigned type so the error checking is null.
>The compiler warns, and the "fix" is to make the code less robust by
>removing the error checking.

+1

The -W-competition between CLANG and GCC has run off the rails.

The basic goal seems to emit as many warnings more than the competitor
as possible, since this "proves" that your compiler is better.

Before long I fear one of the them will introduce .w files where
one can explain details like the above on pseudo-language and the
other magic comments so one can add //!warn "blablabla" comments.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the svn-src-all mailing list