On Tue, Sep 29, 2009 at 12:05:21PM -0700, Jim Showalter wrote:
> Warnings are never harmless--they clutter the build output and 
> introduce cognitive dissonance when trying to see if a build is clean 
> or not.
> 
> I worked on a project where they hadn't enabled warnings during 
> development because it was "too much trouble". When I enabled 
> warnings, there were more than 14,000 of them, and of course then the 
> warnings couldn't be addressed because "there were too many of them".
> 
> Zero tolerance for warnings!

I mostly agree.  There are warnings that one can safely choose to
ignore.  For example, the Sun Studio lint has a very large number of
static analysis options, a few of which I think should be removed (e.g.,
complaints about constant while loop conditions -- while (1) ... is just
too common and useful to complain about, nor is it clear why constant
while loop conditions are a bad thing given that for (;;) elicits no
complaints).  Others you might quibble about in specific projects (e.g.,
lint complaining about ignored function return values when you don't
cast the function return to void).  But ignoring all warnings?  That's
just asking for trouble.  That doesn't appear to be what the SQLite3
community is doing though, so I've no real complaint here.

In this case I agree that the warnings are harmless.  You do have do
wonder: why use constant expressions that result in overflow warnings
(0x1f<<28) when there are equivalent constant expressions that don't
(0xf<<28)?  Compiler variations might be a good reason for not using
certain constant expressions (e.g., D. R.  Hipp's point about the L
suffix).  I don't really know about compilers other than GCC and Sun
Studio, so I'll shut up now :)

Nico
-- 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to