Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/pf/pfctl add some new uses of existing GCC_NO_* var...



details:   https://anonhg.NetBSD.org/src/rev/45cc3665ee6f
branches:  trunk
changeset: 378385:45cc3665ee6f
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Apr 12 02:54:07 2021 +0000

description:
add some new uses of existing GCC_NO_* variables for warning issues.
remove an no longer relevant for gcc7 workaround (works fine in both
gcc9 and gcc 10.)

diffstat:

 external/bsd/flex/bin/Makefile               |  3 ++-
 external/bsd/ipf/bin/ipfstat/Makefile        |  4 +++-
 external/bsd/tcpdump/bin/Makefile            |  3 ++-
 external/gpl2/lvm2/lib/libdevmapper/Makefile |  5 ++++-
 external/gpl2/lvm2/lib/liblvm/Makefile       |  7 ++++---
 external/mit/lua/lib/liblua/Makefile         |  3 ++-
 external/public-domain/xz/bin/xz/Makefile    |  4 +++-
 games/hunt/huntd/Makefile                    |  9 ++++-----
 sys/modules/lua/Makefile                     |  4 +++-
 tests/sys/netatalk/Makefile                  |  4 +++-
 usr.sbin/pf/pfctl/Makefile                   |  4 +++-
 11 files changed, 33 insertions(+), 17 deletions(-)

diffs (201 lines):

diff -r addaef56fb57 -r 45cc3665ee6f external/bsd/flex/bin/Makefile
--- a/external/bsd/flex/bin/Makefile    Mon Apr 12 02:49:02 2021 +0000
+++ b/external/bsd/flex/bin/Makefile    Mon Apr 12 02:54:07 2021 +0000
@@ -1,5 +1,5 @@
 #      from: @(#)Makefile      5.4 (Berkeley) 6/24/90
-#      $NetBSD: Makefile,v 1.15 2019/10/13 07:28:06 mrg Exp $
+#      $NetBSD: Makefile,v 1.16 2021/04/12 02:54:07 mrg Exp $
 #
 # By default, flex will be configured to generate 8-bit scanners only if the
 # -8 flag is given.  If you want it to always generate 8-bit scanners, add
@@ -80,5 +80,6 @@ COPTS.scan.c+=        -O1
 
 COPTS.filter.c+=       ${GCC_NO_FORMAT_TRUNCATION}
 COPTS.misc.c+=         ${GCC_NO_FORMAT_TRUNCATION}
+COPTS.parse.c+=                ${GCC_NO_FORMAT_TRUNCATION}
 
 .include <bsd.prog.mk>
diff -r addaef56fb57 -r 45cc3665ee6f external/bsd/ipf/bin/ipfstat/Makefile
--- a/external/bsd/ipf/bin/ipfstat/Makefile     Mon Apr 12 02:49:02 2021 +0000
+++ b/external/bsd/ipf/bin/ipfstat/Makefile     Mon Apr 12 02:54:07 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.1 2012/03/23 21:29:45 christos Exp $
+#      $NetBSD: Makefile,v 1.2 2021/04/12 02:54:07 mrg Exp $
 
 PROG=          ipfstat
 SRCS=          ipfstat.c
@@ -6,4 +6,6 @@ MAN=            ipfstat.8
 DPADD+=        ${LIBCURSES} ${LIBTERMINFO}
 LDADD+=        -lcurses -lterminfo
 
+COPTS.ipfstat.c+=      ${GCC_NO_FORMAT_OVERFLOW}
+
 .include <bsd.prog.mk>
diff -r addaef56fb57 -r 45cc3665ee6f external/bsd/tcpdump/bin/Makefile
--- a/external/bsd/tcpdump/bin/Makefile Mon Apr 12 02:49:02 2021 +0000
+++ b/external/bsd/tcpdump/bin/Makefile Mon Apr 12 02:54:07 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.20 2020/09/06 07:20:26 mrg Exp $  
+#      $NetBSD: Makefile,v 1.21 2021/04/12 02:54:07 mrg Exp $  
 
 WARNS?=        1       # XXX: need to cleanup later
 
@@ -207,5 +207,6 @@ tcpdump.8: tcpdump.1.in
 
 CWARNFLAGS.clang+=     -Wno-error=address-of-packed-member
 CWARNFLAGS.gcc+=       ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.print-bgp.c+=    ${GCC_NO_FORMAT_TRUNCATION}
 
 .include <bsd.prog.mk>
diff -r addaef56fb57 -r 45cc3665ee6f external/gpl2/lvm2/lib/libdevmapper/Makefile
--- a/external/gpl2/lvm2/lib/libdevmapper/Makefile      Mon Apr 12 02:49:02 2021 +0000
+++ b/external/gpl2/lvm2/lib/libdevmapper/Makefile      Mon Apr 12 02:54:07 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.10 2016/10/04 14:33:16 christos Exp $
+#      $NetBSD: Makefile,v 1.11 2021/04/12 02:54:08 mrg Exp $
 
 USE_SHLIBDIR=  yes
 USE_FORT?=     no
@@ -46,4 +46,7 @@ COPTS.libdm-nbsd-iface.c+= -O0
 .PATH: ${LIBDEVMAPPER_DISTDIR}/regex
 .PATH: ${LIBDEVMAPPER_DISTDIR}/ioctl
 
+COPTS.libdm-common.c   += ${GCC_NO_STRINGOP_OVERFLOW}
+COPTS.fs.c             += ${GCC_NO_STRINGOP_OVERFLOW}
+
 .include <bsd.lib.mk>
diff -r addaef56fb57 -r 45cc3665ee6f external/gpl2/lvm2/lib/liblvm/Makefile
--- a/external/gpl2/lvm2/lib/liblvm/Makefile    Mon Apr 12 02:49:02 2021 +0000
+++ b/external/gpl2/lvm2/lib/liblvm/Makefile    Mon Apr 12 02:54:07 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.8 2016/01/05 13:07:46 christos Exp $
+#      $NetBSD: Makefile,v 1.9 2021/04/12 02:54:08 mrg Exp $
 
 LIBISPRIVATE=  yes
 
@@ -9,13 +9,13 @@ NOLINT=               #defined
 
 LIB=           lvm
 
+.include <bsd.own.mk>
+
 CWARNFLAGS+=   -Wno-parentheses
 
 CPPFLAGS+=     -I${LVM2_DISTDIR}/lib -I${LVM2_DISTDIR}/include \
                -I. 
 
-.include <bsd.own.mk>
-
 # Some parts of liblvm can't be protected because if its
 # alloca() usage.
 #
@@ -24,6 +24,7 @@ CPPFLAGS+=    -Wno-stack-protector
 .endif
 
 CPPFLAGS.imLcLkup.c=-Wno-error
+COPTS.fs.c+=   ${GCC_NO_STRINGOP_OVERFLOW}
 
 SRCS+=         activate.c lvmcache.c toolcontext.c config.c btree.c \
                str_list.c dev-cache.c dev-io.c dev-md.c device.c dev-swap.c \
diff -r addaef56fb57 -r 45cc3665ee6f external/mit/lua/lib/liblua/Makefile
--- a/external/mit/lua/lib/liblua/Makefile      Mon Apr 12 02:49:02 2021 +0000
+++ b/external/mit/lua/lib/liblua/Makefile      Mon Apr 12 02:54:07 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2019/11/11 22:45:26 joerg Exp $
+# $NetBSD: Makefile,v 1.10 2021/04/12 02:54:08 mrg Exp $
 
 LIB=           lua
 LUA_CORE=      lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c \
@@ -16,6 +16,7 @@ INCSDIR=      /usr/include
 
 CPPFLAGS+=     -DLUA_USE_POSIX -DLUA_USE_DLOPEN -DLUA_C89_NUMBERS
 CWARNFLAGS.clang+=     -Wno-empty-body -Wno-error=string-plus-int
+COPTS.lstring.c+=      ${GCC_NO_STRINGOP_OVERFLOW}
 
 LIBDPLIBS+=    m               ${NETBSDSRCDIR}/lib/libm
 
diff -r addaef56fb57 -r 45cc3665ee6f external/public-domain/xz/bin/xz/Makefile
--- a/external/public-domain/xz/bin/xz/Makefile Mon Apr 12 02:49:02 2021 +0000
+++ b/external/public-domain/xz/bin/xz/Makefile Mon Apr 12 02:54:07 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2018/09/25 12:34:42 joerg Exp $
+# $NetBSD: Makefile,v 1.6 2021/04/12 02:54:08 mrg Exp $
 
 PROG=  xz
 BINDIR=        /usr/bin
@@ -51,3 +51,5 @@ DPADD+=       ${LIBLZMA} ${LIBINTL} ${LIBPTHRE
 LDADD+=        -llzma -lintl -lpthread
 .include <bsd.prog.mk>
 .endif
+
+COPTS.message.c                += ${GCC_NO_FORMAT_TRUNCATION}
diff -r addaef56fb57 -r 45cc3665ee6f games/hunt/huntd/Makefile
--- a/games/hunt/huntd/Makefile Mon Apr 12 02:49:02 2021 +0000
+++ b/games/hunt/huntd/Makefile Mon Apr 12 02:54:07 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.8 2019/09/29 23:44:59 mrg Exp $
+#      $NetBSD: Makefile,v 1.9 2021/04/12 02:54:08 mrg Exp $
 
 PROG=  huntd
 SRCS=  answer.c draw.c driver.c execute.c expl.c \
@@ -9,9 +9,8 @@ CPPFLAGS+=-I${.CURDIR}/../include
 
 .include <bsd.own.mk>
 
-# Has fallthru comment that is missed
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
-COPTS.shots.c+=        -Wno-error=implicit-fallthrough
-.endif
+# Appears wrong - should not exceed bounds of array.
+COPTS.answer.c+=       ${GCC_NO_STRINGOP_OVERFLOW}
+COPTS.shots.c+=                ${GCC_NO_STRINGOP_OVERFLOW}
 
 .include <bsd.prog.mk>
diff -r addaef56fb57 -r 45cc3665ee6f sys/modules/lua/Makefile
--- a/sys/modules/lua/Makefile  Mon Apr 12 02:49:02 2021 +0000
+++ b/sys/modules/lua/Makefile  Mon Apr 12 02:54:07 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.11 2019/11/11 22:45:27 joerg Exp $
+#      $NetBSD: Makefile,v 1.12 2021/04/12 02:54:08 mrg Exp $
 
 .include "../Makefile.inc"
 
@@ -24,4 +24,6 @@ CPPFLAGS+=    -I${S}/../external/mit/lua/di
 
 CWARNFLAGS.clang+=     -Wno-error=string-plus-int
 
+COPTS.lstring.c+=      ${GCC_NO_STRINGOP_OVERFLOW}
+
 .include <bsd.kmodule.mk>
diff -r addaef56fb57 -r 45cc3665ee6f tests/sys/netatalk/Makefile
--- a/tests/sys/netatalk/Makefile       Mon Apr 12 02:49:02 2021 +0000
+++ b/tests/sys/netatalk/Makefile       Mon Apr 12 02:54:07 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2014/12/02 19:48:21 christos Exp $
+# $NetBSD: Makefile,v 1.2 2021/04/12 02:54:08 mrg Exp $
 #
 WARNS?=6
 
@@ -9,4 +9,6 @@ CPPFLAGS+=      -I${NETBSDSRCDIR}/sys -D_TEST
 
 TESTS_C=       t_print
 
+COPTS.t_print.c+=      ${GCC_NO_FORMAT_TRUNCATION}
+
 .include <bsd.test.mk>
diff -r addaef56fb57 -r 45cc3665ee6f usr.sbin/pf/pfctl/Makefile
--- a/usr.sbin/pf/pfctl/Makefile        Mon Apr 12 02:49:02 2021 +0000
+++ b/usr.sbin/pf/pfctl/Makefile        Mon Apr 12 02:54:07 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.4 2008/06/18 09:06:28 yamt Exp $
+#      $NetBSD: Makefile,v 1.5 2021/04/12 02:54:08 mrg Exp $
 #      $OpenBSD: Makefile,v 1.17 2004/07/16 23:44:24 frantzen Exp $
 
 .include <bsd.own.mk>          # for MKDYNAMICROOT definition
@@ -25,4 +25,6 @@ LDSTATIC?=    -static
 
 .include <bsd.prog.mk>
 
+COPTS.pfctl_osfp.c+=   ${GCC_NO_FORMAT_TRUNCATION}
+
 .PATH: ${NETBSDSRCDIR}/dist/pf/sbin/pfctl



Home | Main Index | Thread Index | Old Index