Report on GCC additional warnings

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 25 Oct 2012 23:53:06 +1300

As mentioned in the report on Coverity thread I've run a build scan of
the default built components using some additional warnings we don't
usually test with but which produce potentially useful messages for our
code requirements.

The procedure script was posted earlier. Basically it was to build Squid
configured with the warning and record the number of messages it
produced. Below is a table of the -W options and count of issues it
displayed. Not all issues are accurate but most are.

SCAN: effc++ = 1353 in four distinct groups

1188 "X should be initialized in the member initialization list" - most
likely to be a false positive due to our allocation style.
   115 "X has pointer data members" - related to missing
constructor/destructors
     32 "base class X has a non-virtual destructor"
     18 "X should return Y" - implicit casting or return values before
return. Looks mostly like template problems.

SCAN: undef = 118
  ** looks like a wash out. Useful list to peruse and fix a few entries,
but quite a few appear to be difficult fixes.

SCAN: shadow = 30
  * "callback", "conn" "size", "reconfiguring" and "exitStatus" stand
out as potentially dangerous urgent fixes needed.
  * warning log in http://bugs.squid-cache.org/show_bug.cgi?id=3676

SCAN: useless-cast = 0
* great. shall we enable it immediately for automated assistance?

SCAN: padded = 102
  * There are a few things which appear to be padding on-wire
definitions. Those need to be checked.
  * Most need some further analysis to figure out how important their
size actually is to overall memory usage.

Are there any other C++ relevant warnings people think we should test for?

Amos
Received on Thu Oct 25 2012 - 10:53:22 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 25 2012 - 12:00:08 MDT