From: Hugo Villeneuve Date: Fri, 3 Jan 2014 06:56:37 +0000 (-0500) Subject: Add additional compile warning flags X-Git-Tag: v2.0.0~24 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=bd7be8da77f3bd315fcff4a35cb91b173e8e2190;p=emu8051.git Add additional compile warning flags Also changed way that warning flags are defined in autoconf files. --- diff --git a/configure.ac b/configure.ac index d39a607..7deeb84 100644 --- a/configure.ac +++ b/configure.ac @@ -22,8 +22,8 @@ AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T -dnl Basic CFLAGS values -CFLAGS="${CFLAGS} -Wall" +dnl Basic warning CFLAGS values +WARNINGCFLAGS="-Wall -Wextra -Wformat -Wformat-security" PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.26.0]) AC_SUBST(GLIB_CFLAGS) @@ -82,7 +82,7 @@ AM_CONDITIONAL([USE_AS504HV],[test x"$AS504HV_CHECK" = x"yes"]) AM_CONDITIONAL([USE_AS504],[test x"$AS504_CHECK" = x"yes"]) AM_CONDITIONAL([USE_AS51],[test x"$ASEM51_CHECK" = x"yes"]) -AC_SUBST(CFLAGS) +AC_SUBST(WARNINGCFLAGS) AC_SUBST(LIBS) AC_SUBST(ac_aux_dir) diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am index deaae8a..63eedab 100644 --- a/src/cli/Makefile.am +++ b/src/cli/Makefile.am @@ -1,7 +1,7 @@ # This file is processed by GNU automake to generate Makefile.in AM_CPPFLAGS = \ - -Wall \ + $(WARNINGCFLAGS) \ -I@top_srcdir@ \ -I@top_srcdir@/src/common diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 2d0df82..ba295d9 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -1,7 +1,7 @@ # This file is processed by GNU automake to generate Makefile.in AM_CPPFLAGS = \ - -Wall \ + $(WARNINGCFLAGS) \ -I$(top_srcdir) noinst_LIBRARIES = libemu8051.a diff --git a/src/gtk/Makefile.am b/src/gtk/Makefile.am index 22bb895..699d76e 100644 --- a/src/gtk/Makefile.am +++ b/src/gtk/Makefile.am @@ -1,7 +1,7 @@ # This file is processed by GNU automake to generate Makefile.in AM_CPPFLAGS = \ - -Wall \ + $(WARNINGCFLAGS) \ -I@top_srcdir@ \ -I@top_srcdir@/src/common \ -I$(top_srcdir)/pixmaps \