Enable a bit more gcc warning coverage. * configure.ac (nw): Turn on some warnings that no longer trigger a gcc warning, or where we reduce the scope of unwarned code. * src/m4.h (progname): Drop redundant declaration. * src/builtin.c (includes): Use header for program_name.
Signed-off-by: Eric Blake <ebl...@redhat.com> --- ChangeLog | 6 ++++++ configure.ac | 10 ++++------ src/builtin.c | 1 + src/m4.h | 1 - 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc01374..35f0748 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2012-09-04 Eric Blake <ebl...@redhat.com> + build: add more compiler checking + * configure.ac (nw): Turn on some warnings that no longer trigger + a gcc warning, or where we reduce the scope of unwarned code. + * src/m4.h (progname): Drop redundant declaration. + * src/builtin.c (includes): Use header for program_name. + build: pick up latest gnulib fixes * gnulib: Update to latest. * m4/gnulib-cache.m4: Regenerate. diff --git a/configure.ac b/configure.ac index cedb922..6886273 100644 --- a/configure.ac +++ b/configure.ac @@ -72,17 +72,15 @@ if test "$gl_gcc_warnings" = yes; then CFLAGS=$save_CFLAGS]) nw= - nw="$nw -Waggregate-return" # C90 is anachronistic + nw="$nw -Waggregate-return" # K&R is anachronistic + nw="$nw -Wtraditional-conversion" # K&R is anachronistic + nw="$nw -Wundef" # K&R is anachronistic + nw="$nw -Wtraditional" # K&R is anachronistic nw="$nw -Wlong-long" # C90 is anachronistic - nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib - nw="$nw -Wtraditional" # Warns on #elif which we use often nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings nw="$nw -Wpadded" # Our structs are not packed - nw="$nw -Wredundant-decls" # Gnulib has multiple decls - nw="$nw -Wunreachable-code" # Needed in output.c nw="$nw -Wconversion" # Too many warnings for now nw="$nw -Wsign-conversion" # Too many warnings for now - nw="$nw -Wtraditional-conversion" # Too many warnings for now nw="$nw -Wcast-qual" # Too many warnings for now nw="$nw -Wswitch-enum" # Too many warnings for now # This, $nw, is the list of warnings we disable. diff --git a/src/builtin.c b/src/builtin.c index 5ff443e..b7e4e11 100644 --- a/src/builtin.c +++ b/src/builtin.c @@ -26,6 +26,7 @@ #include "execute.h" #include "memchr2.h" +#include "progname.h" #include "regex.h" #include "spawn-pipe.h" #include "wait-process.h" diff --git a/src/m4.h b/src/m4.h index c23e448..8ddb9da 100644 --- a/src/m4.h +++ b/src/m4.h @@ -138,7 +138,6 @@ extern const char *user_word_regexp; /* -W */ /* Error handling. */ extern int retcode; -extern const char *program_name; void m4_error (int, int, const char *, ...) M4_GNUC_PRINTF(3, 4); void m4_error_at_line (int, int, const char *, int, -- 1.7.11.4 _______________________________________________ M4-patches mailing list M4-patches@gnu.org https://lists.gnu.org/mailman/listinfo/m4-patches