Module Name: src
Committed By: lukem
Date: Sat Jun 3 21:28:53 UTC 2023
Modified Files:
src/tests/kernel: Makefile
src/usr.bin/newsyslog: Makefile
Log Message:
adapt to ${CC_WNO_FORMAT_TRUNCATION}
To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/tests/kernel/Makefile
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/newsyslog/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/kernel/Makefile
diff -u src/tests/kernel/Makefile:1.71 src/tests/kernel/Makefile:1.72
--- src/tests/kernel/Makefile:1.71 Fri Apr 21 21:50:05 2023
+++ src/tests/kernel/Makefile Sat Jun 3 21:28:52 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.71 2023/04/21 21:50:05 gutteridge Exp $
+# $NetBSD: Makefile,v 1.72 2023/06/03 21:28:52 lukem Exp $
NOMAN= # defined
@@ -82,10 +82,8 @@ t_subr_prf.c: gen_t_subr_prf ${NETBSDSRC
CPPFLAGS.t_subr_prf.c= -Wno-pointer-sign # XXX platform vs kernel SHA2
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
# Test explicitly tests failure modes.
-CPPFLAGS.t_subr_prf.c+= -Wno-error=format-truncation
-.endif
+CPPFLAGS.t_subr_prf.c+= ${CC_WNO_FORMAT_TRUNCATION}
SANITIZER_RENAME_CLASSES+= t_subr_prf
SANITIZER_RENAME_FILES.t_subr_prf+= t_subr_prf.c
Index: src/usr.bin/newsyslog/Makefile
diff -u src/usr.bin/newsyslog/Makefile:1.20 src/usr.bin/newsyslog/Makefile:1.21
--- src/usr.bin/newsyslog/Makefile:1.20 Sun Sep 29 23:45:01 2019
+++ src/usr.bin/newsyslog/Makefile Sat Jun 3 21:28:53 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2019/09/29 23:45:01 mrg Exp $
+# $NetBSD: Makefile,v 1.21 2023/06/03 21:28:53 lukem Exp $
PROG= newsyslog
SRCS= newsyslog.c
@@ -8,8 +8,6 @@ MLINKS+=newsyslog.8 newsyslog.conf.5
.include <bsd.own.mk>
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
-COPTS.newsyslog.c += -Wno-error=format-truncation
-.endif
+COPTS.newsyslog.c += ${CC_WNO_FORMAT_TRUNCATION}
.include <bsd.prog.mk>