Pass the flag -Wno-format-zero-length to gcc (if supported by gcc) while compiling tools. This flag only affects those tools for which -Wformat is enabled (at this time only exp-drd).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8270 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index a6a53a8..3e5e233 100644
--- a/configure.in
+++ b/configure.in
@@ -985,6 +985,29 @@
 fi
 
 
+# does this compiler support -Wno-format-zero-length ?
+
+AC_MSG_CHECKING([if gcc accepts -Wno-format-zero-length])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="-Wno-format-zero-length"
+
+AC_TRY_COMPILE(
+[ ],
+[
+  return 0;
+],
+[
+AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [-Wno-format-zero-length])
+AC_MSG_RESULT([yes])
+],
+[
+AC_SUBST([FLAG_W_NO_FORMAT_ZERO_LENGTH], [])
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+
 # does this compiler support -Wextra or the older -W ?
 
 AC_MSG_CHECKING([if gcc accepts -Wextra or -W])