[linux-nfc] [neard][PATCH 04/16] build: enable -Wformat=2 warnings

Krzysztof Kozlowski <[email protected]>
Newsgroups org.01.lists.linux-nfc,dev.linux.lists.oe-linux-nfc
Message-ID <[email protected]>
The -Wformat=2 compiler warning can detect potentials errors when using
printf-like functions.  It is supported by GCC and clang.

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
 accflags.m4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/accflags.m4 b/accflags.m4
index e4df62c13cf3..57cc48beecc2 100644
--- a/accflags.m4
+++ b/accflags.m4
@@ -14,6 +14,7 @@ AC_DEFUN([NEARD_COMPILER_FLAGS], [
 		CFLAGS="$CFLAGS -Wmissing-declarations"
 		CFLAGS="$CFLAGS -Wredundant-decls"
 		CFLAGS="$CFLAGS -Wcast-align"
+		CFLAGS="$CFLAGS -Wformat=2"
 		CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"
 
 		AX_CHECK_COMPILE_FLAG([-Wdouble-promotion], [CFLAGS="$CFLAGS -Wdouble-promotion"])
-- 
2.27.0
_______________________________________________
Linux-nfc mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.