Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src adapt to ${CC_WNO_FORMAT_TRUNCATION}



details:   https://anonhg.NetBSD.org/src/rev/4bdd21f880dd
branches:  trunk
changeset: 376184:4bdd21f880dd
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sat Jun 03 21:28:52 2023 +0000

description:
adapt to ${CC_WNO_FORMAT_TRUNCATION}

diffstat:

 tests/kernel/Makefile      |  6 ++----
 usr.bin/newsyslog/Makefile |  6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diffs (40 lines):

diff -r e8987dbc324f -r 4bdd21f880dd tests/kernel/Makefile
--- a/tests/kernel/Makefile     Sat Jun 03 21:27:11 2023 +0000
+++ b/tests/kernel/Makefile     Sat Jun 03 21:28:52 2023 +0000
@@ -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
diff -r e8987dbc324f -r 4bdd21f880dd usr.bin/newsyslog/Makefile
--- a/usr.bin/newsyslog/Makefile        Sat Jun 03 21:27:11 2023 +0000
+++ b/usr.bin/newsyslog/Makefile        Sat Jun 03 21:28:52 2023 +0000
@@ -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>



Home | Main Index | Thread Index | Old Index