Makefile.inc: Enable -Wextra and -Wformat-nonliteral
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 4 Oct 2016 17:42:21 +0000 (10:42 -0700)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 5 Oct 2016 06:43:21 +0000 (08:43 +0200)
Instead of selecting some of the options enabled by -Wextra, enable
-Wextra and disable some of the options enabled by -Wextra. Enable
-Wformat-nonliteral.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Makefile.inc

index 376f00a..be6b2bc 100644 (file)
@@ -61,8 +61,10 @@ RM           = rm -f
 LN             = ln -sf
 INSTALL_PROGRAM        = install
 
-OPTFLAGS       = -Wunused -Wstrict-prototypes -O2 -g -pipe -Wformat-security -Wall \
-                 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4
+OPTFLAGS       = -O2 -g -pipe -Wall -Wextra -Wformat=2 \
+                 -Wno-sign-compare -Wno-unused-parameter -Wno-clobbered\
+                 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector \
+                 --param=ssp-buffer-size=4
 
 CFLAGS         = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\"
 SHARED_FLAGS   = -shared