tests/lib/libarchive: Suppress -Werror=stringop-truncation error

This logic correctly uses strncpy(3) to fully initialize a fixed-width field, and also ensures
NUL-termination on the next line as other users of the field expect.

Add -Werror=stringop-truncation to prevent build failure, when run with MKSANITIZER=yes.

Error was reported when build.sh was run with MKSANITIZER=yes flag.

Reviewed by: kamil@
This commit is contained in:
fox 2020-06-07 23:20:52 +00:00
parent 7d0fd7a3da
commit bf982b61a2

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.4 2020/01/19 17:36:57 christos Exp $
# $NetBSD: Makefile,v 1.5 2020/06/07 23:20:52 fox Exp $
NOMAN=
@ -609,4 +609,5 @@ list.h: ${SRCS.h_libarchive} Makefile
${TOOL_GREP} -v _truncated_filter_ | \
${TOOL_GREP} -v test_compat_pax_libarchive_2x > ${.TARGET}
COPTS.test_archive_string_conversion.c+= ${GCC_NO_STRINGOP_TRUNCATION}