Module Name:    src
Committed By:   mrg
Date:           Mon Apr 12 06:08:31 UTC 2021

Modified Files:
        src/external/bsd/libarchive/lib/libarchive: Makefile
        src/external/bsd/ntp/lib/libopts: Makefile
        src/external/bsd/openldap/lib/liblber: Makefile
        src/external/mit/xorg/bin/xauth: Makefile
        src/external/public-domain/sqlite/lib: Makefile
        src/lib/libc/net: Makefile.inc
        src/sys/conf: copts.mk
        src/sys/rump/net/lib/libnet: Makefile
        src/tests/lib/libevent: Makefile

Log Message:
new GCC_NO_* uses for warning issues.  most of the users of the new
GCC_NO_RETURN_LOCAL_ADDR are bugs in GCC itself, not the code.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
    src/external/bsd/libarchive/lib/libarchive/Makefile
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/ntp/lib/libopts/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/openldap/lib/liblber/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/bin/xauth/Makefile
cvs rdiff -u -r1.13 -r1.14 src/external/public-domain/sqlite/lib/Makefile
cvs rdiff -u -r1.91 -r1.92 src/lib/libc/net/Makefile.inc
cvs rdiff -u -r1.5 -r1.6 src/sys/conf/copts.mk
cvs rdiff -u -r1.34 -r1.35 src/sys/rump/net/lib/libnet/Makefile
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libevent/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libarchive/lib/libarchive/Makefile
diff -u src/external/bsd/libarchive/lib/libarchive/Makefile:1.12 src/external/bsd/libarchive/lib/libarchive/Makefile:1.13
--- src/external/bsd/libarchive/lib/libarchive/Makefile:1.12	Sat May 16 18:31:46 2020
+++ src/external/bsd/libarchive/lib/libarchive/Makefile	Mon Apr 12 06:08:30 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2020/05/16 18:31:46 christos Exp $
+#	$NetBSD: Makefile,v 1.13 2021/04/12 06:08:30 mrg Exp $
 
 .include <bsd.init.mk>
 
@@ -449,14 +449,12 @@ MLINKS+=	archive_write_set_options.3 arc
 MLINKS+=	archive_write_set_passphrase.3 archive_write_set_passphrase_callback.3
 MLINKS+=	libarchive.3 archive.3
 
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
-COPTS.archive_acl.c += -Wno-error=implicit-fallthrough
-COPTS.archive_read.c += -Wno-error=implicit-fallthrough
-COPTS.archive_read_support_format_7zip.c += -Wno-error=implicit-fallthrough
-COPTS.archive_read_support_format_mtree.c += -Wno-error=implicit-fallthrough
-.endif
-
-COPTS.target.c+=	${GCC_NO_STRINGOP_TRUNCATION}
+COPTS.archive_acl.c+=				${GCC_NO_IMPLICIT_FALLTHRU}
+COPTS.archive_read.c+=				${GCC_NO_IMPLICIT_FALLTHRU}
+COPTS.archive_read_support_format_7zip.c+=	${GCC_NO_IMPLICIT_FALLTHRU}
+COPTS.archive_read_support_format_mtree.c+=	${GCC_NO_IMPLICIT_FALLTHRU}
+COPTS.archive_read_support_format_rar5.c+=	${GCC_NO_MAYBE_UNINITIALIZED}
+COPTS.target.c+=				${GCC_NO_STRINGOP_TRUNCATION}
 COPTS.archive_write_set_format_iso9660.c+=	${GCC_NO_STRINGOP_TRUNCATION}
 
 .include <bsd.lib.mk>

Index: src/external/bsd/ntp/lib/libopts/Makefile
diff -u src/external/bsd/ntp/lib/libopts/Makefile:1.15 src/external/bsd/ntp/lib/libopts/Makefile:1.16
--- src/external/bsd/ntp/lib/libopts/Makefile:1.15	Fri Feb  2 01:02:40 2018
+++ src/external/bsd/ntp/lib/libopts/Makefile	Mon Apr 12 06:08:30 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2018/02/02 01:02:40 mrg Exp $
+#	$NetBSD: Makefile,v 1.16 2021/04/12 06:08:30 mrg Exp $
 
 LIBISPRIVATE=yes
 
@@ -16,8 +16,10 @@ CPPFLAGS+=-I${DIST}
 
 SRCS=libopts.c
 
-COPTS.libopts.c += -DPOSIX_SHELL="\"/bin/sh\"" -Wno-format-nonliteral
+COPTS.libopts.c+=	 -DPOSIX_SHELL="\"/bin/sh\"" -Wno-format-nonliteral
+
 COPTS.libopts.c+=	${${ACTIVE_CC} == "gcc":? -Wno-format-contains-nul :}
 COPTS.libopts.c+=	${${ACTIVE_CC} == "clang":? -Wno-format :}
+COPTS.libopts.c+=	${GCC_NO_FORMAT_OVERFLOW}
 
 .include <bsd.lib.mk>

Index: src/external/bsd/openldap/lib/liblber/Makefile
diff -u src/external/bsd/openldap/lib/liblber/Makefile:1.2 src/external/bsd/openldap/lib/liblber/Makefile:1.3
--- src/external/bsd/openldap/lib/liblber/Makefile:1.2	Tue May 27 08:58:26 2008
+++ src/external/bsd/openldap/lib/liblber/Makefile	Mon Apr 12 06:08:30 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2008/05/27 08:58:26 lukem Exp $
+#	$NetBSD: Makefile,v 1.3 2021/04/12 06:08:30 mrg Exp $
 
 USE_FORT?=	yes
 
@@ -57,4 +57,7 @@ MLINKS+=	lber-types.3 ber_bvarray_add.3 
 		lber-types.3 ber_free.3 \
 		lber-types.3 ber_str2bv.3
 
+# GCC 10 is wrong here.
+COPTS.memory.c+=	${GCC_NO_RETURN_LOCAL_ADDR}
+
 .include <bsd.lib.mk>

Index: src/external/mit/xorg/bin/xauth/Makefile
diff -u src/external/mit/xorg/bin/xauth/Makefile:1.7 src/external/mit/xorg/bin/xauth/Makefile:1.8
--- src/external/mit/xorg/bin/xauth/Makefile:1.7	Thu Jan  3 23:39:47 2019
+++ src/external/mit/xorg/bin/xauth/Makefile	Mon Apr 12 06:08:30 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2019/01/03 23:39:47 mrg Exp $
+#	$NetBSD: Makefile,v 1.8 2021/04/12 06:08:30 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -15,6 +15,7 @@ CPPFLAGS+=      	-DIPv6
 .endif
 
 CWARNFLAGS.clang=	-Wno-empty-body
+COPTS.parsedpy.c+=	${GCC_NO_STRINGOP_OVERFLOW}
 
 LDADD+=	-lXau -lXmuu -lXt -lSM -lICE -lXext -lX11
 DPADD+=	${LIBXAU} ${LIBXMUU} ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11}

Index: src/external/public-domain/sqlite/lib/Makefile
diff -u src/external/public-domain/sqlite/lib/Makefile:1.13 src/external/public-domain/sqlite/lib/Makefile:1.14
--- src/external/public-domain/sqlite/lib/Makefile:1.13	Thu Nov 12 17:53:43 2020
+++ src/external/public-domain/sqlite/lib/Makefile	Mon Apr 12 06:08:31 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2020/11/12 17:53:43 nia Exp $
+# $NetBSD: Makefile,v 1.14 2021/04/12 06:08:31 mrg Exp $
 
 LIB=		sqlite3
 INCS=		sqlite3.h sqlite3ext.h
@@ -20,6 +20,7 @@ FILESDIR_sqlite3.pc=	/usr/lib/pkgconfig
 CLEANFILES+=sqlite3.pc
 
 CWARNFLAGS.clang+=	-Wno-error=implicit-int-float-conversion
+COPTS.sqlite3.c+=	${GCC_NO_RETURN_LOCAL_ADDR}
 
 .include <bsd.own.mk>
 

Index: src/lib/libc/net/Makefile.inc
diff -u src/lib/libc/net/Makefile.inc:1.91 src/lib/libc/net/Makefile.inc:1.92
--- src/lib/libc/net/Makefile.inc:1.91	Sun Oct 13 07:28:10 2019
+++ src/lib/libc/net/Makefile.inc	Mon Apr 12 06:08:30 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.91 2019/10/13 07:28:10 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.92 2021/04/12 06:08:30 mrg Exp $
 #	@(#)Makefile.inc	8.2 (Berkeley) 9/5/93
 
 # net sources
@@ -151,4 +151,5 @@ MAN+=	sctp_bindx.3 sctp_connectx.3 sctp_
 	sctp_getassocid.3 sctp_getpaddrs.3 sctp_opt_info.3 sctp_peeloff.3 \
 	sctp_recvmsg.3 sctp_send.3 sctp_sendmsg.3
 
-COPTS.getaddrinfo.c+=	${GCC_NO_STRINGOP_OVERFLOW}
+COPTS.getaddrinfo.c+=		${GCC_NO_STRINGOP_OVERFLOW}
+COPTS.sctp_sys_calls.c+=	${GCC_NO_ADDR_OF_PACKED_MEMBER}

Index: src/sys/conf/copts.mk
diff -u src/sys/conf/copts.mk:1.5 src/sys/conf/copts.mk:1.6
--- src/sys/conf/copts.mk:1.5	Sat Mar  7 00:53:24 2020
+++ src/sys/conf/copts.mk	Mon Apr 12 06:08:31 2021
@@ -1,7 +1,10 @@
-#	$NetBSD: copts.mk,v 1.5 2020/03/07 00:53:24 mrg Exp $
+#	$NetBSD: copts.mk,v 1.6 2021/04/12 06:08:31 mrg Exp $
 
 # MI per-file compiler options required.
 
+# Use -Wno-error=foo when the ultimate goal is to fix this warning
+# with code change, and use -Wno-foo when the warning is bad.
+
 .ifndef _SYS_CONF_COPTS_MK_
 _SYS_CONF_COPTS_MK_=1
 
@@ -17,4 +20,15 @@ COPTS.via_dmablit.c+=	-Wno-error=implici
 COPTS.linux_machdep.c+=	-Wno-error=unused-but-set-variable
 .endif
 
+.if defined(HAVE_GCC) && ${HAVE_GCC} >= 10 && ${ACTIVE_CC} == "gcc"
+COPTS.ath.c+=		-Wno-error=enum-conversion
+COPTS.dpt.c+=		${GCC_NO_ADDR_OF_PACKED_MEMBER}
+COPTS.ffs_appleufs.c+=	${GCC_NO_ADDR_OF_PACKED_MEMBER}
+# These are wrong. The code explicitly avoids this ase.
+COPTS.in_pcb.c+=	${GCC_NO_RETURN_LOCAL_ADDR}
+COPTS.in6_pcb.c+=	${GCC_NO_RETURN_LOCAL_ADDR}
+# Also seems wrong.
+COPTS.magma.c+=		${GCC_NO_MAYBE_UNINITIALIZED}
+.endif
+
 .endif

Index: src/sys/rump/net/lib/libnet/Makefile
diff -u src/sys/rump/net/lib/libnet/Makefile:1.34 src/sys/rump/net/lib/libnet/Makefile:1.35
--- src/sys/rump/net/lib/libnet/Makefile:1.34	Sat Sep 12 10:44:32 2020
+++ src/sys/rump/net/lib/libnet/Makefile	Mon Apr 12 06:08:31 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.34 2020/09/12 10:44:32 roy Exp $
+#	$NetBSD: Makefile,v 1.35 2021/04/12 06:08:31 mrg Exp $
 #
 
 
@@ -28,6 +28,9 @@ SRCS+=	rtsock_70.c uipc_usrreq_70.c
 .endif
 
 COPTS.if_ethersubr.c+=		${GCC_NO_CAST_FUNCTION_TYPE}
+# GCC is wrong here.
+COPTS.in_pcb.c+=		${GCC_NO_RETURN_LOCAL_ADDR}
+COPTS.in6_pcb.c+=		${GCC_NO_RETURN_LOCAL_ADDR}
 
 .include "${.CURDIR}/../libnetinet/Makefile.inc"
 .include "${.CURDIR}/../libnetinet6/Makefile.inc"

Index: src/tests/lib/libevent/Makefile
diff -u src/tests/lib/libevent/Makefile:1.5 src/tests/lib/libevent/Makefile:1.6
--- src/tests/lib/libevent/Makefile:1.5	Sun Oct 13 07:28:14 2019
+++ src/tests/lib/libevent/Makefile	Mon Apr 12 06:08:31 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2019/10/13 07:28:14 mrg Exp $
+# $NetBSD: Makefile,v 1.6 2021/04/12 06:08:31 mrg Exp $
 
 TESTSDIR=	${TESTSBASE}/lib/libevent
 
@@ -27,5 +27,6 @@ DPADD+=		${LIBEVENT} ${LIBEVENT_PTHREADS
 LDADD+=		-levent_pthreads -levent -lz -lpthread
 
 COPTS.regress_rpc.c+=	${GCC_NO_CAST_FUNCTION_TYPE}
+COPTS.regress_dns.c+=	${GCC_NO_MAYBE_UNINITIALIZED}
 
 .include <bsd.test.mk>

Reply via email to