Boost logo

Boost :

Subject: Re: [boost] Are warnings acceptable artifacts from builds?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-09-09 11:22:12

Vinnie wrote:
> >From
> "Static analysis means analyzing code at or before
> compile-time to check for correctness. Static analysis
> consists mostly of making sure SQLite compiles without
> warnings, even when all warnings are enabled. SQLite is
> developed primarily using GCC and it does compile without
> warnings on GCC using the -Wall and -Wextra flags. There are
> occasional reports of warnings coming from VC++, however.
> Static analysis has not proven to be helpful in finding bugs.
> We cannot call to mind a single problem in SQLite that was
> detected by static analysis that was not first seen by one of
> the other testing methods described above. On the other hand,
> we have on occasion introduced new bugs in our efforts to get
> SQLite to compile without warnings.
> Our experience, then, is that static analysis is
> counter-productive to quality. In other words, focusing on
> static analysis (being concerned with compiler warnings)
> actually reduces the quality of the code. Nevertheless, we
> developers have capitulated to pressure from users and
> actively work to eliminate compiler warnings. We are willing
> to do this because the other tests described above do an
> excellent job of finding the bugs that are often introduced
> when removing compiler warnings, so that product quality is
> probably not decreased as a result."

My experience has been quite the contrary. Chasing down compiler warnings has eliminated a good number of bugs in shared code here. Sure, some of the bugs could have been found with better testing, but we have what we have. Using a belt and suspenders is often helpful!

Even for the SQLite team, eliminating all warnings makes new ones more promiment such that a developer is quickly alerted to what might be an issue before the code is checked in or undergoes testing.

Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

Boost list run by bdawes at, gregod at, cpdaniel at, john at