[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using -Werror in CFLAGS for a debian package build

On Mon, 23 May 2011 at 01:44:03 +0200, Goswin von Brederlow wrote:
> Or the reverse
>   gcc -Wformat=error

gcc -Wno-error -Wformat -Werror=format

You might also be interested in m4/tp-compiler-warnings.m4 in telepathy-glib.
Usage looks like this:

      dnl Make warnings fatal if:
      [test "x$official_release" = xno],
      dnl Warn about these things:
      [all \
       extra \
       declaration-after-statement \
       shadow \
       strict-prototypes \
       missing-prototypes \
       sign-compare \
       nested-externs \
       pointer-arith \
       format-security \
      dnl But don't even warn about these things:
      [missing-field-initializers \

We switch off -Werror by default for each tarball release, and switch it back
on in git immediately after the release, so only developers get these fatal
warnings (that's what the test of $official_release is for).


Reply to: