diff --git a/ChangeLog b/ChangeLog index 20b20f0b..4e7826ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -27,6 +27,15 @@ Likewise. * m4/nullsort.m4: Removed occurrences of space followed by tab. + Enabled GCC warnings for declarations after statements. + + Enabled GCC warnings for declarations after statements. + * import-gnulib.config: Import the gnulib module 'warnings' + * configure.ac: Add GCC warning -Wdeclaration-after-statement. + * Makefile.am: Add AM_CFLAGS and set it to $(WARN_CFLAGS). + * find/Makefile.am, doc/Makefile.am, lib/Makefile.am: Likewise. + * locate/Makefile.am, xargs/Makefile.am: Likewise. + 2009-03-03 James Youngman Fix Savannah bug #25359, more efficiently (suggestion by Nick Fortino). diff --git a/Makefile.am b/Makefile.am index c9c7334a..7e5d5087 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,6 @@ AUTOMAKE_OPTIONS=gnits # readme-alpha +AM_CFLAGS = $(WARN_CFLAGS) EXTRA_DIST = COPYING ChangeLog TODO config.h.in stamp-h.in \ THANKS import-gnulib.sh import-gnulib.config diff --git a/configure.ac b/configure.ac index 7c62eed3..454ba7b9 100644 --- a/configure.ac +++ b/configure.ac @@ -88,6 +88,8 @@ AC_SYS_LARGEFILE gl_INIT +dnl Enable various GCC warnings. +gl_WARN_ADD([-Wdeclaration-after-statement]) dnl Older versions of gnulib/m4/nls.m4 provide AM_MKINSTALLDIRS. diff --git a/doc/Makefile.am b/doc/Makefile.am index 59938b95..28a52351 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,3 +1,5 @@ +AM_CFLAGS = $(WARN_CFLAGS) + info_TEXINFOS = find.texi find-maint.texi find_TEXINFOS = perm.texi getdate.texi regexprops.texi fdl.texi find_maint_TEXINFOS = fdl.texi diff --git a/find/Makefile.am b/find/Makefile.am index 0e70a623..d6a9d64a 100644 --- a/find/Makefile.am +++ b/find/Makefile.am @@ -1,4 +1,5 @@ AUTOMAKE_OPTIONS = std-options +AM_CFLAGS = $(WARN_CFLAGS) localedir = $(datadir)/locale # noinst_PROGRAMS = regexprops # regexprops_SOURCES = regexprops.c diff --git a/import-gnulib.config b/import-gnulib.config index 3703eed6..1591b61d 100644 --- a/import-gnulib.config +++ b/import-gnulib.config @@ -77,6 +77,7 @@ timespec verify version-etc version-etc-fsf +warnings wcwidth xalloc xalloc-die diff --git a/lib/Makefile.am b/lib/Makefile.am index 0c47006b..3fbc39db 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2,6 +2,7 @@ AUTOMAKE_OPTIONS = 1.5 gnits # no-dependencies +AM_CFLAGS = $(WARN_CFLAGS) noinst_LIBRARIES = libfind.a diff --git a/locate/Makefile.am b/locate/Makefile.am index 3e727e74..0f031c7d 100644 --- a/locate/Makefile.am +++ b/locate/Makefile.am @@ -1,5 +1,6 @@ # The default database to build and search. AUTOMAKE_OPTIONS = std-options +AM_CFLAGS = $(WARN_CFLAGS) LOCATE_DB = $(localstatedir)/locatedb localedir = $(datadir)/locale diff --git a/xargs/Makefile.am b/xargs/Makefile.am index 7653c314..87da63cf 100644 --- a/xargs/Makefile.am +++ b/xargs/Makefile.am @@ -1,4 +1,5 @@ AUTOMAKE_OPTIONS = std-options +AM_CFLAGS = $(WARN_CFLAGS) localedir = $(datadir)/locale bin_PROGRAMS = xargs man_MANS = xargs.1