Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/traceroute6 add support for new GCC 9 warnings that...
details: https://anonhg.NetBSD.org/src/rev/d2c3c6757cce
branches: trunk
changeset: 938306:d2c3c6757cce
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Sep 06 07:20:26 2020 +0000
description:
add support for new GCC 9 warnings that may be too much to fix
right now. new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.
apply to a bunch of the tree. mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it. (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.) clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.
diffstat:
external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile | 3 ++-
external/bsd/ipf/Makefile.inc | 3 ++-
external/bsd/ipf/bin/ipmon/Makefile | 4 +++-
external/bsd/ntp/bin/ntpd/Makefile | 13 +++++--------
external/bsd/tcpdump/bin/Makefile | 3 ++-
external/bsd/wpa/bin/hostapd/Makefile | 4 +++-
libexec/identd/Makefile | 3 ++-
libexec/lfs_cleanerd/Makefile | 4 +++-
sbin/dump/Makefile | 4 +++-
sbin/dump_lfs/Makefile | 4 ++--
sbin/fsck_ffs/Makefile | 4 +++-
sbin/fsck_lfs/Makefile | 4 +++-
sbin/fsck_v7fs/Makefile | 4 +++-
sbin/fsdb/Makefile | 4 +++-
sbin/newfs/Makefile | 4 +++-
sbin/newfs_lfs/Makefile | 4 +++-
sbin/newfs_udf/Makefile | 3 ++-
sbin/newfs_v7fs/Makefile | 4 +++-
sbin/nvmectl/Makefile | 4 +++-
sbin/resize_lfs/Makefile | 4 +++-
sbin/scan_ffs/Makefile | 4 +++-
share/mk/bsd.kmodule.mk | 3 ++-
share/mk/bsd.own.mk | 4 +++-
sys/arch/i386/stand/Makefile.booters | 4 +++-
sys/arch/i386/stand/boot/Makefile.boot | 4 +++-
sys/arch/i386/stand/bootxx/Makefile.bootxx | 4 +++-
sys/arch/i386/stand/efiboot/Makefile.efiboot | 4 +++-
sys/arch/i386/stand/efiboot/bootx64/Makefile | 3 ++-
sys/arch/i386/stand/lib/Makefile | 3 ++-
sys/arch/macppc/stand/Makefile.inc | 3 ++-
sys/arch/sparc/stand/boot/Makefile | 3 ++-
sys/arch/sparc/stand/bootxx/Makefile | 3 ++-
sys/arch/sparc/stand/ofwboot/Makefile | 3 ++-
sys/arch/zaurus/stand/Makefile.inc | 3 ++-
sys/conf/Makefile.kern.inc | 3 ++-
sys/modules/udf/Makefile | 4 +++-
sys/rump/fs/lib/libffs/Makefile | 5 ++++-
sys/rump/fs/lib/liblfs/Makefile | 3 ++-
sys/rump/fs/lib/libmsdos/Makefile | 4 +++-
sys/rump/fs/lib/libudf/Makefile | 3 ++-
sys/rump/fs/lib/libv7fs/Makefile | 4 +++-
sys/rump/fs/lib/libzfs/Makefile | 4 +++-
sys/rump/net/lib/Makefile.inc | 3 ++-
sys/stand/efiboot/Makefile.efiboot | 3 ++-
tests/lib/libc/sys/Makefile | 5 ++++-
usr.bin/ftp/Makefile | 4 +++-
usr.sbin/bootp/common/Makefile | 3 ++-
usr.sbin/dumplfs/Makefile | 4 +++-
usr.sbin/fstyp/Makefile | 3 ++-
usr.sbin/installboot/Makefile | 3 ++-
usr.sbin/makefs/udf/Makefile.inc | 3 ++-
usr.sbin/map-mbone/Makefile | 4 +++-
usr.sbin/mrinfo/Makefile | 4 +++-
usr.sbin/mrouted/Makefile | 3 ++-
usr.sbin/mtrace/Makefile | 4 +++-
usr.sbin/ndbootd/Makefile | 3 ++-
usr.sbin/pf/Makefile.inc | 3 ++-
usr.sbin/puffs/rump_lfs/Makefile | 3 ++-
usr.sbin/racoon/Makefile | 4 +++-
usr.sbin/rtadvd/Makefile | 3 ++-
usr.sbin/traceroute/Makefile | 4 +++-
usr.sbin/traceroute6/Makefile | 4 +++-
62 files changed, 162 insertions(+), 70 deletions(-)
diffs (truncated from 1035 to 300 lines):
diff -r 3b9739ef7e53 -r d2c3c6757cce external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile
--- a/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/external/apache2/mDNSResponder/usr.sbin/mdnsd/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2018/11/18 18:58:44 christos Exp $
+# $NetBSD: Makefile,v 1.13 2020/09/06 07:20:26 mrg Exp $
PROG= mdnsd
@@ -18,5 +18,6 @@
MAN= mdnsd.8
CWARNFLAGS.clang+= -Wno-unused-value -Wno-error=address-of-packed-member
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce external/bsd/ipf/Makefile.inc
--- a/external/bsd/ipf/Makefile.inc Sun Sep 06 05:31:46 2020 +0000
+++ b/external/bsd/ipf/Makefile.inc Sun Sep 06 07:20:26 2020 +0000
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile.inc,v 1.4 2019/10/13 07:28:06 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.5 2020/09/06 07:20:26 mrg Exp $
WARNS?= 1 # XXX -Wcast-qual -Wshadow
CWARNFLAGS.clang+= -Wno-format -Wno-tautological-compare \
-Wno-self-assign -Wno-array-bounds \
-Wno-error=unused-const-variable \
-Wno-error=address-of-packed-member
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
.include <bsd.own.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce external/bsd/ipf/bin/ipmon/Makefile
--- a/external/bsd/ipf/bin/ipmon/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/external/bsd/ipf/bin/ipmon/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2020/02/12 00:30:48 fox Exp $
+# $NetBSD: Makefile,v 1.4 2020/09/06 07:20:26 mrg Exp $
PROG= ipmon
SRCS= ipmon.c ipmon_y.c ipmon_l.c
@@ -36,4 +36,6 @@
${TOOL_SED} -e 's/yy/ipmon_yy/g' \
${.ALLSRC} > ${.TARGET}
+COPTS.ipmon.c+= ${GCC_NO_ADDR_OF_PACKED_MEMBER} ${GCC_NO_FORMAT_OVERFLOW}
+
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce external/bsd/ntp/bin/ntpd/Makefile
--- a/external/bsd/ntp/bin/ntpd/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/external/bsd/ntp/bin/ntpd/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2020/05/29 10:53:02 kamil Exp $
+# $NetBSD: Makefile,v 1.27 2020/09/06 07:20:26 mrg Exp $
.include <bsd.own.mk>
@@ -87,17 +87,14 @@
.PATH: ${DIST}
YHEADER=1
-# XXXGCC5
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 5 && ${ACTIVE_CC} == "gcc"
-COPTS.ntp_control.c+= -Wno-error=maybe-uninitialized
-.endif
-
-COPTS.ntp_loopfilter.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=restrict :}
+COPTS.ntp_control.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-error=maybe-uninitialized :}
+COPTS.ntp_loopfilter.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -Wno-error=restrict :}
COPTS.ntp_loopfilter.c+= ${GCC_NO_FORMAT_TRUNCATION}
COPTS.ntp_crypto.c+= ${GCC_NO_FORMAT_TRUNCATION}
-COPTS.refclock_jjy.c+= ${GCC_NO_STRINGOP_TRUNCATION}
+COPTS.refclock_jjy.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_FORMAT_TRUNCATION}
COPTS.refclock_parse.c+= ${GCC_NO_FORMAT_TRUNCATION}
COPTS.refclock_leitch.c+= ${GCC_NO_FORMAT_TRUNCATION}
COPTS.refclock_neoclock4x.c+= ${GCC_NO_FORMAT_TRUNCATION}
+COPTS.ntp_io.c+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce external/bsd/tcpdump/bin/Makefile
--- a/external/bsd/tcpdump/bin/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/external/bsd/tcpdump/bin/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2017/05/21 15:28:39 riastradh Exp $
+# $NetBSD: Makefile,v 1.20 2020/09/06 07:20:26 mrg Exp $
WARNS?= 1 # XXX: need to cleanup later
@@ -206,5 +206,6 @@
cp ${.ALLSRC} ${.TARGET}
CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce external/bsd/wpa/bin/hostapd/Makefile
--- a/external/bsd/wpa/bin/hostapd/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/external/bsd/wpa/bin/hostapd/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2020/02/03 09:10:47 roy Exp $
+# $NetBSD: Makefile,v 1.14 2020/09/06 07:20:26 mrg Exp $
.include "${.CURDIR}/../Makefile.inc"
@@ -215,4 +215,6 @@
SRCS+= sha1-pbkdf2.c sha1.c md5.c
.endif
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce libexec/identd/Makefile
--- a/libexec/identd/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/libexec/identd/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2019/08/24 13:20:52 rmind Exp $
+# $NetBSD: Makefile,v 1.19 2020/09/06 07:20:26 mrg Exp $
.include <bsd.own.mk>
@@ -28,5 +28,6 @@
# XXX
COPTS+= -fno-strict-aliasing
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce libexec/lfs_cleanerd/Makefile
--- a/libexec/lfs_cleanerd/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/libexec/lfs_cleanerd/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2015/10/10 22:34:46 dholland Exp $
+# $NetBSD: Makefile,v 1.20 2020/09/06 07:20:26 mrg Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93
.include "Makefile.inc"
@@ -11,4 +11,6 @@
LDSTATIC?= -static
.endif
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce sbin/dump/Makefile
--- a/sbin/dump/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/sbin/dump/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2019/10/13 07:28:12 mrg Exp $
+# $NetBSD: Makefile,v 1.41 2020/09/06 07:20:27 mrg Exp $
# @(#)Makefile 8.1 (Berkeley) 6/5/93
# dump.h header file
@@ -39,5 +39,7 @@
COPTS.ffs_inode.c+= -Wno-pointer-sign
COPTS.traverse.c+= ${GCC_NO_FORMAT_TRUNCATION}
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+CWARNFLAGS.gcc+= ${GCC_NO_FORMAT_TRUNCATION}
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce sbin/dump_lfs/Makefile
--- a/sbin/dump_lfs/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/sbin/dump_lfs/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2019/10/13 07:28:12 mrg Exp $
+# $NetBSD: Makefile,v 1.18 2020/09/06 07:20:27 mrg Exp $
# @(#)Makefile 8.1 (Berkeley) 6/5/93
# lfs_inode.c LFS filestore-specific routines
@@ -30,6 +30,6 @@
.PATH: ${NETBSDSRCDIR}/sbin/dump ${NETBSDSRCDIR}/sys/ufs/lfs \
${NETBSDSRCDIR}/sys/ufs/ffs
-COPTS.traverse.c+= ${GCC_NO_FORMAT_TRUNCATION}
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER} ${GCC_NO_FORMAT_TRUNCATION}
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce sbin/fsck_ffs/Makefile
--- a/sbin/fsck_ffs/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/sbin/fsck_ffs/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.49 2018/06/11 14:18:17 kamil Exp $
+# $NetBSD: Makefile,v 1.50 2020/09/06 07:20:27 mrg Exp $
# @(#)Makefile 8.2 (Berkeley) 4/27/95
# when making a change to this file, please check if the change is
@@ -13,5 +13,7 @@
.include "Makefile.common"
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+
.include <bsd.prog.mk>
.include <bsd.subdir.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce sbin/fsck_lfs/Makefile
--- a/sbin/fsck_lfs/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/sbin/fsck_lfs/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2013/06/08 21:13:19 dholland Exp $
+# $NetBSD: Makefile,v 1.21 2020/09/06 07:20:27 mrg Exp $
# @(#)Makefile 8.1 (Berkeley) 6/5/93
WARNS?= 3 # XXX: sign-compare issues
@@ -19,4 +19,6 @@
LDADD+=-lutil
DPADD+=${LIBUTIL}
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce sbin/fsck_v7fs/Makefile
--- a/sbin/fsck_v7fs/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/sbin/fsck_v7fs/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2012/09/05 22:58:53 riz Exp $
+# $NetBSD: Makefile,v 1.3 2020/09/06 07:20:27 mrg Exp $
.include <bsd.own.mk>
@@ -17,4 +17,6 @@
LDADD+=-lutil
DPADD+=${LIBUTIL}
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce sbin/fsdb/Makefile
--- a/sbin/fsdb/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/sbin/fsdb/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.39 2019/10/28 22:52:43 christos Exp $
+# $NetBSD: Makefile,v 1.40 2020/09/06 07:20:27 mrg Exp $
# @(#)Makefile 8.1 (Berkeley) 6/5/93
.include <bsd.own.mk>
@@ -44,4 +44,6 @@
COPTS.inode.c+= -O0
.endif
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce sbin/newfs/Makefile
--- a/sbin/newfs/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/sbin/newfs/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2017/02/08 16:11:40 rin Exp $
+# $NetBSD: Makefile,v 1.41 2020/09/06 07:20:27 mrg Exp $
# @(#)Makefile 8.2 (Berkeley) 3/27/94
# when making a change to this file, please check if the change is
@@ -15,4 +15,6 @@
.include "Makefile.common"
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce sbin/newfs_lfs/Makefile
--- a/sbin/newfs_lfs/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/sbin/newfs_lfs/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2013/06/08 21:13:19 dholland Exp $
+# $NetBSD: Makefile,v 1.13 2020/09/06 07:20:27 mrg Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93
WARNS?= 3 # XXX: sign-compare issues
@@ -25,4 +25,6 @@
CPPFLAGS+=-I${FSCK_LFS} -I${FSCK} # -DNDEBUG # -DVERBOSE_BLOCKMAP
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
+
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce sbin/newfs_udf/Makefile
--- a/sbin/newfs_udf/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/sbin/newfs_udf/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2017/01/11 12:19:43 joerg Exp $
+# $NetBSD: Makefile,v 1.7 2020/09/06 07:20:27 mrg Exp $
.include <bsd.own.mk>
@@ -15,5 +15,6 @@
LDADD+=-lutil
CWARNFLAGS.clang+= -Wno-error=address-of-packed-member
+CWARNFLAGS.gcc+= ${GCC_NO_ADDR_OF_PACKED_MEMBER}
.include <bsd.prog.mk>
diff -r 3b9739ef7e53 -r d2c3c6757cce sbin/newfs_v7fs/Makefile
--- a/sbin/newfs_v7fs/Makefile Sun Sep 06 05:31:46 2020 +0000
+++ b/sbin/newfs_v7fs/Makefile Sun Sep 06 07:20:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2012/09/05 23:01:42 riz Exp $
+# $NetBSD: Makefile,v 1.5 2020/09/06 07:20:28 mrg Exp $
.include <bsd.own.mk>
@@ -18,4 +18,6 @@
Home |
Main Index |
Thread Index |
Old Index