From: Taylor R Campbell Date: Thu, 8 Nov 2018 17:09:47 +0000 (+0000) Subject: Disable -Wstringop-truncation. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~116^2~3 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=facd05570f9d26fd859580e40a3f2eb12987f5ba;p=mit-scheme.git Disable -Wstringop-truncation. We use strncpy in very limited ways, one of which is for struct sockaddr_un, for which strncpy truncation is correct. --- diff --git a/src/microcode/configure.ac b/src/microcode/configure.ac index 77ed4747d..1c4babf26 100644 --- a/src/microcode/configure.ac +++ b/src/microcode/configure.ac @@ -231,6 +231,8 @@ if test ${GCC} = yes; then -Wuninitialized \ -Wunreachable-code \ -Wwrite-strings \ + \ + -Wno-error=stringop-truncation \ ; do AC_MSG_CHECKING([for compiler warning $flag]) SAVED_CFLAGS="$CFLAGS" @@ -243,6 +245,8 @@ if test ${GCC} = yes; then # other possibilities: # -Wmissing-prototypes (requires prototypes for DEFINE_PRIMITIVE) + # -Wstringop-truncation (requires it to not whine about correct use + # of strncpy for buffers that are _not_ null-terminated) fi FOO=`${INSTALL} --help 2> /dev/null | ${FGREP} -e --preserve-timestamps` if test "x${FOO}" != x; then