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 --- 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