Disable -Wstringop-truncation.
authorTaylor R Campbell <campbell@mumble.net>
Thu, 8 Nov 2018 17:09:47 +0000 (17:09 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Thu, 8 Nov 2018 17:24:50 +0000 (17:24 +0000)
We use strncpy in very limited ways, one of which is for struct
sockaddr_un, for which strncpy truncation is correct.

src/microcode/configure.ac

index 77ed4747d2e1d93b230797506e190a58d9d4586e..1c4babf26afbfcb56a8eb4855f7d7d6df13166e4 100644 (file)
@@ -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