diff mbox

[15/15] Makefile.inc: Enable -Wextra and -Wformat-nonliteral

Message ID 4d3a965d-3caa-e596-8351-d0ae2465e54d@sandisk.com (mailing list archive)
State Not Applicable, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Bart Van Assche Oct. 4, 2016, 5:42 p.m. UTC
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 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/Makefile.inc b/Makefile.inc
index 376f00a..be6b2bc 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -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