NetBSD/libexec/lfs_cleanerd/Makefile.inc
fox 7d0fd7a3da libexec/lfs_cleanerd: 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@, riastradh@
2020-06-07 23:15:53 +00:00

22 lines
669 B
Makefile

# $NetBSD: Makefile.inc,v 1.7 2020/06/07 23:15:53 fox Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93
WARNS?=3 # XXX: too many sign-compare issues
.include <bsd.own.mk>
SRCS+= lfs_cleanerd.c fdfs.c coalesce.c cleansrv.c
SRCS+= lfs_cksum.c
SRCS+= bufcache.c vnode.c lfs.c kernelops.c # segwrite.c
.PATH: ${NETBSDSRCDIR}/sys/ufs/lfs ${NETBSDSRCDIR}/sbin/fsck_lfs \
${NETBSDSRCDIR}/libexec/lfs_cleanerd
COPTS.lfs_cleanerd.c+= ${GCC_NO_STRINGOP_TRUNCATION}
FSCK_LFS= ${NETBSDSRCDIR}/sbin/fsck_lfs
DPADD+= ${LIBUTIL}
LDADD+= -lutil
CPPFLAGS+=-I${FSCK_LFS} -I${NETBSDSRCDIR}/sbin/mount_lfs # -DUSE_CLIENT_SERVER
#CPPFLAGS+=-DREPAIR_ZERO_FINFO
#CPPFLAGS+=-DTEST_PATTERN