external/cddl/osnet: 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:26:54 +00:00
parent bf982b61a2
commit 1644357e99

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.10 2018/05/28 21:05:11 chs Exp $
# $NetBSD: Makefile,v 1.11 2020/06/07 23:26:54 fox Exp $
# $FreeBSD: head/cddl/usr.bin/ctfmerge/Makefile 314654 2017-03-04 11:30:04Z ngie $
@ -36,4 +36,6 @@ LDADD+=-lpthread
DPADD+=${LIBPTHREAD}
.endif
COPTS.ctfmerge.c+= ${GCC_NO_STRINGOP_TRUNCATION}
.include <bsd.prog.mk>