From 4bb911a82a02e5e38f334f5a3a7c6a04617a58d6 Mon Sep 17 00:00:00 2001
From: Hugo Villeneuve <hugo@hugovil.com>
Date: Sat, 28 Feb 2015 17:08:23 -0500
Subject: [PATCH] Add warning cflags

---
 configure.ac    | 5 +++--
 src/Makefile.am | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index ced48d5..0ee718f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,8 +18,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"
 
 dnl Trying to locate the X window system's includes and libraries, and sets the
 dnl variables x_includes and x_libraries to their locations. Also adds the
@@ -43,6 +43,7 @@ dnl Checking for math library
 AC_CHECK_LIB(m, sin, LIBS="${LIBS} -lm",dnl
              echo "Can't find math library" ; exit 1, "${X_LIBS}")
 
+AC_SUBST(WARNINGCFLAGS)
 AC_SUBST(CFLAGS)
 AC_SUBST(LIBS)
 AC_SUBST(ac_aux_dir)
diff --git a/src/Makefile.am b/src/Makefile.am
index 1131f0a..d2cf47f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,6 +3,7 @@
 AM_CPPFLAGS = \
     -I$(top_srcdir) \
     -I$(top_srcdir)/pixmaps \
+    $(WARNINGCFLAGS) \
     $(GTK_CFLAGS)
 
 bin_PROGRAMS = dockbatmon
-- 
2.20.1