[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

compiler warnings buildbot?

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Fri, 11 May 2012 16:09:14 +0300

Idea: add a buildbot slave that turns red whenever a compiler warning
(such as "unused variable" or or "non-C89 comments") is introduced.

Justification: we treat new compiler warnings as bugs, and point them
out and fix them when they are introduced; this just makes them easier
to spot.

Proposed implementation:
% apt-get build-dep subversion; install serf 1.0.x_at_HEAD
% ./autogen.sh
% './configure' '--enable-maintainer-mode' '-C' 'CFLAGS=
-DSVN_DEPRECATED= -Wformat=0 -Wno-unreachable-code -g
-Werror' 'CC=x86_64-linux-gnu-gcc' '--with-serf=/usr/local'
% make && return "green" || return "red"

When I rebuild HEAD cleanly as above, I get only four warnings, all of
which were introduced recently.

A more sophisticated implementation might parse make's stderr and use
some smarter logic to decide what errors to ignore; the above only
checks for "No warnings other than 'Unreachable code' and 'Format
string' anywhere in the code".


Received on 2012-05-11 15:09:58 CEST

This is an archived mail posted to the Subversion Dev mailing list.