Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libevent new GCC_NO_* uses for warning issues. mo...



details:   https://anonhg.NetBSD.org/src/rev/eca6ea91b376
branches:  trunk
changeset: 378393:eca6ea91b376
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Apr 12 06:08:30 2021 +0000

description:
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.

diffstat:

 external/bsd/libarchive/lib/libarchive/Makefile |  16 +++++++---------
 external/bsd/ntp/lib/libopts/Makefile           |   6 ++++--
 external/bsd/openldap/lib/liblber/Makefile      |   5 ++++-
 external/mit/xorg/bin/xauth/Makefile            |   3 ++-
 external/public-domain/sqlite/lib/Makefile      |   3 ++-
 lib/libc/net/Makefile.inc                       |   5 +++--
 sys/conf/copts.mk                               |  16 +++++++++++++++-
 sys/rump/net/lib/libnet/Makefile                |   5 ++++-
 tests/lib/libevent/Makefile                     |   3 ++-
 9 files changed, 43 insertions(+), 19 deletions(-)

diffs (184 lines):

diff -r 0813ce287a09 -r eca6ea91b376 external/bsd/libarchive/lib/libarchive/Makefile
--- a/external/bsd/libarchive/lib/libarchive/Makefile   Mon Apr 12 05:11:09 2021 +0000
+++ b/external/bsd/libarchive/lib/libarchive/Makefile   Mon Apr 12 06:08:30 2021 +0000
@@ -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>
diff -r 0813ce287a09 -r eca6ea91b376 external/bsd/ntp/lib/libopts/Makefile
--- a/external/bsd/ntp/lib/libopts/Makefile     Mon Apr 12 05:11:09 2021 +0000
+++ b/external/bsd/ntp/lib/libopts/Makefile     Mon Apr 12 06:08:30 2021 +0000
@@ -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>
diff -r 0813ce287a09 -r eca6ea91b376 external/bsd/openldap/lib/liblber/Makefile
--- a/external/bsd/openldap/lib/liblber/Makefile        Mon Apr 12 05:11:09 2021 +0000
+++ b/external/bsd/openldap/lib/liblber/Makefile        Mon Apr 12 06:08:30 2021 +0000
@@ -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>
diff -r 0813ce287a09 -r eca6ea91b376 external/mit/xorg/bin/xauth/Makefile
--- a/external/mit/xorg/bin/xauth/Makefile      Mon Apr 12 05:11:09 2021 +0000
+++ b/external/mit/xorg/bin/xauth/Makefile      Mon Apr 12 06:08:30 2021 +0000
@@ -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}
diff -r 0813ce287a09 -r eca6ea91b376 external/public-domain/sqlite/lib/Makefile
--- a/external/public-domain/sqlite/lib/Makefile        Mon Apr 12 05:11:09 2021 +0000
+++ b/external/public-domain/sqlite/lib/Makefile        Mon Apr 12 06:08:30 2021 +0000
@@ -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>
 
diff -r 0813ce287a09 -r eca6ea91b376 lib/libc/net/Makefile.inc
--- a/lib/libc/net/Makefile.inc Mon Apr 12 05:11:09 2021 +0000
+++ b/lib/libc/net/Makefile.inc Mon Apr 12 06:08:30 2021 +0000
@@ -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}
diff -r 0813ce287a09 -r eca6ea91b376 sys/conf/copts.mk
--- a/sys/conf/copts.mk Mon Apr 12 05:11:09 2021 +0000
+++ b/sys/conf/copts.mk Mon Apr 12 06:08:30 2021 +0000
@@ -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
diff -r 0813ce287a09 -r eca6ea91b376 sys/rump/net/lib/libnet/Makefile
--- a/sys/rump/net/lib/libnet/Makefile  Mon Apr 12 05:11:09 2021 +0000
+++ b/sys/rump/net/lib/libnet/Makefile  Mon Apr 12 06:08:30 2021 +0000
@@ -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"
diff -r 0813ce287a09 -r eca6ea91b376 tests/lib/libevent/Makefile
--- a/tests/lib/libevent/Makefile       Mon Apr 12 05:11:09 2021 +0000
+++ b/tests/lib/libevent/Makefile       Mon Apr 12 06:08:30 2021 +0000
@@ -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>



Home | Main Index | Thread Index | Old Index