[linux-nfc] [neard][PATCH v2 69/73] build: enable -Wformat=2 warnings
Krzysztof Kozlowski <[email protected]> Mon, 19 Jul 2021 13:08:15 +0200
| 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