summaryrefslogtreecommitdiff
path: root/config-scripts
diff options
context:
space:
mode:
authorMichael Sweet <michael.r.sweet@gmail.com>2017-09-24 11:51:07 -0400
committerMichael Sweet <michael.r.sweet@gmail.com>2017-09-24 11:51:07 -0400
commit4279822fe4b646475a9de75dd857c1bb5d5fab09 (patch)
tree3e0580db1fda01638a6c83453ad67b385fda422a /config-scripts
parentc6990c1ed53c215de5ed7913a6e3c5b3c6ef4aee (diff)
downloadcups-4279822fe4b646475a9de75dd857c1bb5d5fab09.tar.gz
Suppress new GCC warning about snprintf truncation (Issue #5110)
Diffstat (limited to 'config-scripts')
-rw-r--r--config-scripts/cups-compiler.m49
1 files changed, 9 insertions, 0 deletions
diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4
index bf4411e49..49963934f 100644
--- a/config-scripts/cups-compiler.m4
+++ b/config-scripts/cups-compiler.m4
@@ -185,6 +185,15 @@ if test -n "$GCC"; then
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
+ AC_MSG_CHECKING(whether compiler supports -Wno-format-truncation)
+ OLDCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wno-format-truncation"
+ AC_TRY_COMPILE(,,
+ [OPTIM="$OPTIM -Wno-format-truncation"
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
+ CFLAGS="$OLDCFLAGS"
+
# Additional warning options for development testing...
if test -d .svn; then
OPTIM="-Werror $OPTIM"