Source-Changes-HG archive

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

[src/trunk]: src introduce some common variables for use in GCC warning disab...



details:   https://anonhg.NetBSD.org/src/rev/c4bc5923eccf
branches:  trunk
changeset: 966076:c4bc5923eccf
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Oct 13 07:28:04 2019 +0000

description:
introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."

diffstat:

 bin/pax/Makefile                                         |   4 ++-
 crypto/external/bsd/netpgp/bin/netpgpverify/Makefile     |   4 ++-
 crypto/external/bsd/netpgp/lib/netpgp/Makefile           |   4 ++-
 crypto/external/bsd/netpgp/lib/verify/Makefile           |   7 ++--
 crypto/external/bsd/openssh/bin/ssh-agent/Makefile       |   4 ++-
 crypto/external/bsd/openssh/bin/ssh-keygen/Makefile      |   4 ++-
 crypto/external/bsd/openssh/bin/ssh/Makefile             |   4 ++-
 crypto/external/bsd/openssh/bin/sshd/Makefile            |   9 ++++--
 crypto/external/bsd/openssh/lib/Makefile                 |   5 ++-
 external/bsd/am-utils/bin/amd/Makefile                   |   3 +-
 external/bsd/fetch/lib/Makefile                          |   6 +--
 external/bsd/flex/bin/Makefile                           |   5 ++-
 external/bsd/ipf/Makefile.inc                            |   4 ++-
 external/bsd/ipf/bin/ipftest/Makefile                    |   4 ++-
 external/bsd/iscsi/lib/Makefile                          |   4 ++-
 external/bsd/libarchive/lib/libarchive/Makefile          |   5 ++-
 external/bsd/libpcap/lib/Makefile                        |   9 ++---
 external/bsd/llvm/lib/libLLVMAnalysis/Makefile           |   3 +-
 external/bsd/llvm/lib/libLLVMRuntimeDyld/Makefile        |   3 +-
 external/bsd/mdocml/bin/mandoc/Makefile                  |   4 ++-
 external/bsd/ntp/bin/ntpd/Makefile                       |   7 ++++-
 external/bsd/ntp/bin/ntpq/Makefile                       |   4 ++-
 external/bsd/ntp/bin/sntp/Makefile                       |   4 ++-
 external/bsd/ntp/lib/libntp/Makefile                     |   4 ++-
 external/bsd/pdisk/bin/Makefile                          |  11 ++++--
 external/bsd/ppp/usr.sbin/pppd/Makefile                  |   4 ++-
 external/bsd/ppp/usr.sbin/pppstats/Makefile              |   4 ++-
 external/bsd/tmux/usr.bin/tmux/Makefile                  |   7 +---
 external/bsd/top/bin/Makefile                            |   5 ++-
 external/cddl/osnet/lib/libdtrace/Makefile               |  10 ++----
 external/gpl2/groff/bin/troff/Makefile                   |   4 ++-
 external/gpl2/xcvs/bin/xcvs/Makefile                     |  10 ++++++-
 external/gpl3/gcc/lib/libiberty/Makefile                 |   4 ++-
 external/mit/xorg/bin/xconsole/Makefile                  |   4 ++-
 external/mit/xorg/bin/xmh/Makefile                       |   4 ++-
 external/mit/xorg/lib/libX11/Makefile.ximcp              |  14 +++++----
 external/mit/xorg/lib/libX11/Makefile.xlibi18n           |   4 ++-
 external/mit/xorg/lib/libXvMCW/Makefile                  |   4 ++-
 external/mit/xorg/lib/libxkbfile/Makefile                |   4 ++-
 external/mit/xorg/server/drivers/xf86-video-sis/Makefile |   4 +-
 external/mpl/bind/bin/dnssec/dnssec-verify/Makefile      |   4 ++-
 external/mpl/dhcp/bin/relay/Makefile                     |   4 ++-
 external/mpl/dhcp/lib/common/Makefile                    |   5 ++-
 external/zlib/pigz/bin/pigz/Makefile                     |   6 +++-
 games/hack/Makefile                                      |   5 ++-
 games/hunt/hunt/Makefile                                 |   4 ++-
 games/rogue/Makefile                                     |   4 ++-
 games/tetris/Makefile                                    |   4 ++-
 lib/libc/citrus/Makefile.inc                             |   6 +++-
 lib/libc/net/Makefile.inc                                |   8 ++---
 lib/libc/resolv/Makefile.inc                             |   6 +--
 lib/libc/rpc/Makefile.inc                                |  24 +++++++--------
 lib/libedit/Makefile                                     |   6 +++-
 lib/libisns/Makefile                                     |   4 ++-
 lib/libpam/modules/pam_lastlog/Makefile                  |   6 +--
 lib/librump/Makefile                                     |   7 ++++-
 lib/librumpclient/Makefile                               |   4 ++-
 lib/librumpres/Makefile                                  |   4 ++-
 lib/librumpuser/Makefile                                 |   4 ++-
 lib/libutil/Makefile                                     |   8 ++---
 libexec/ftpd/Makefile                                    |   5 ++-
 libexec/rpc.rquotad/Makefile                             |   4 ++-
 libexec/rpc.rstatd/Makefile                              |   4 ++-
 libexec/rpc.rusersd/Makefile                             |   5 ++-
 libexec/rpc.rwalld/Makefile                              |   4 ++-
 libexec/rpc.sprayd/Makefile                              |   5 ++-
 sbin/disklabel/Makefile                                  |   5 ++-
 sbin/dump/Makefile                                       |   3 +-
 sbin/dump_lfs/Makefile                                   |   4 ++-
 sbin/fdisk/Makefile                                      |   4 ++-
 sbin/init/Makefile                                       |   4 ++-
 sbin/iscsictl/Makefile                                   |   3 ++
 sbin/pppoectl/Makefile                                   |   4 ++-
 sbin/raidctl/Makefile                                    |   4 ++-
 sbin/restore/Makefile                                    |   5 ++-
 sbin/rndctl/Makefile                                     |   4 ++-
 sbin/route/Makefile                                      |   4 ++-
 sbin/routed/Makefile                                     |   4 ++-
 sbin/umount/Makefile                                     |   4 ++-
 share/mk/bsd.own.mk                                      |  11 ++++++-
 sys/modules/coredump/Makefile                            |   4 ++-
 sys/modules/filemon/Makefile                             |   4 ++-
 sys/modules/ptrace_common/Makefile                       |   4 ++-
 sys/rump/librump/rumpkern/Makefile.rumpkern              |   8 ++++-
 sys/rump/net/lib/libnet/Makefile                         |   4 ++-
 tests/fs/common/Makefile                                 |   8 ++++-
 tests/fs/nfs/nfsservice/Makefile                         |   8 ++++-
 tests/lib/libc/rpc/Makefile                              |   4 ++-
 tests/lib/libc/ssp/Makefile                              |   6 +--
 tests/lib/libevent/Makefile                              |   4 ++-
 usr.bin/btpin/Makefile                                   |   4 ++-
 usr.bin/config/Makefile                                  |   4 ++-
 usr.bin/crunch/crunchgen/Makefile                        |   4 ++-
 usr.bin/cvslatest/Makefile                               |   4 ++-
 usr.bin/fstat/Makefile                                   |   4 ++-
 usr.bin/hexdump/Makefile                                 |   4 ++-
 usr.bin/login/Makefile                                   |   4 ++-
 usr.bin/mail/Makefile                                    |   5 ++-
 usr.bin/make/Makefile                                    |  10 ++++--
 usr.bin/man/Makefile                                     |   4 ++-
 usr.bin/mklocale/Makefile                                |   3 +-
 usr.bin/msgs/Makefile                                    |   4 ++-
 usr.bin/netstat/Makefile                                 |   6 +++-
 usr.bin/quota/Makefile                                   |   4 ++-
 usr.bin/rdist/Makefile                                   |   6 +--
 usr.bin/rpcgen/Makefile                                  |   4 ++-
 usr.bin/rpcinfo/Makefile                                 |   4 ++-
 usr.bin/rup/Makefile                                     |   4 ++-
 usr.bin/rusers/Makefile                                  |   4 ++-
 usr.bin/rwall/Makefile                                   |   4 ++-
 usr.bin/showmount/Makefile                               |   4 ++-
 usr.bin/sort/Makefile                                    |   4 ++-
 usr.bin/systat/Makefile                                  |   8 ++--
 usr.bin/telnet/Makefile                                  |   4 ++-
 usr.bin/unifdef/Makefile                                 |   4 ++-
 usr.bin/utoppya/Makefile                                 |   4 ++-
 usr.bin/wall/Makefile                                    |   4 ++-
 usr.sbin/acpitools/amldb/Makefile                        |   4 ++-
 usr.sbin/altq/libaltq/Makefile                           |   4 ++-
 usr.sbin/altq/tbrconfig/Makefile                         |   4 ++-
 usr.sbin/apm/Makefile                                    |   4 ++-
 usr.sbin/apmd/Makefile                                   |   4 ++-
 usr.sbin/btpand/Makefile                                 |   4 ++-
 usr.sbin/catman/Makefile                                 |   4 +-
 usr.sbin/cnwctl/Makefile                                 |   4 ++-
 usr.sbin/crash/Makefile                                  |   4 ++-
 usr.sbin/edquota/Makefile                                |   4 ++-
 usr.sbin/eshconfig/Makefile                              |   4 ++-
 usr.sbin/ifwatchd/Makefile                               |   4 ++-
 usr.sbin/ipwctl/Makefile                                 |   4 ++-
 usr.sbin/iwictl/Makefile                                 |   4 ++-
 usr.sbin/makefs/Makefile                                 |   8 ++++-
 usr.sbin/mopd/common/Makefile                            |   4 ++-
 usr.sbin/mopd/mopd/Makefile                              |   4 +-
 usr.sbin/mountd/Makefile                                 |   4 ++-
 usr.sbin/mrouted/Makefile                                |   5 ++-
 usr.sbin/perfused/Makefile                               |   3 +-
 usr.sbin/rarpd/Makefile                                  |   4 ++-
 usr.sbin/rbootd/Makefile                                 |   4 ++-
 usr.sbin/repquota/Makefile                               |   4 ++-
 usr.sbin/route6d/Makefile                                |   4 ++-
 usr.sbin/rpc.bootparamd/Makefile                         |   4 ++-
 usr.sbin/rpc.lockd/Makefile                              |   6 +++-
 usr.sbin/rpc.pcnfsd/Makefile                             |   6 +++-
 usr.sbin/rpc.statd/Makefile                              |   7 ++++-
 usr.sbin/rpc.yppasswdd/Makefile                          |   4 ++-
 usr.sbin/rpcbind/Makefile                                |   7 ++++-
 usr.sbin/rtadvd/Makefile                                 |   5 ++-
 usr.sbin/rwhod/Makefile                                  |   4 ++-
 usr.sbin/sliplogin/Makefile                              |   4 ++-
 usr.sbin/spray/Makefile                                  |   4 ++-
 usr.sbin/sup/lib/Makefile                                |   4 ++-
 usr.sbin/sup/sup/Makefile                                |   4 ++-
 usr.sbin/sup/supfilesrv/Makefile                         |   4 ++-
 usr.sbin/sup/supscan/Makefile                            |   4 ++-
 usr.sbin/sysinst/Makefile.inc                            |   6 +--
 usr.sbin/syslogd/Makefile                                |   6 +--
 usr.sbin/wiconfig/Makefile                               |   4 ++-
 usr.sbin/ypbind/Makefile                                 |   4 ++-
 usr.sbin/ypserv/yppush/Makefile                          |   5 ++-
 usr.sbin/ypserv/ypserv/Makefile                          |   4 ++-
 usr.sbin/ypserv/ypxfr/Makefile                           |   4 ++-
 usr.sbin/ypset/Makefile                                  |   4 ++-
 163 files changed, 563 insertions(+), 241 deletions(-)

diffs (truncated from 2810 to 300 lines):

diff -r 959a169bd419 -r c4bc5923eccf bin/pax/Makefile
--- a/bin/pax/Makefile  Sun Oct 13 06:11:31 2019 +0000
+++ b/bin/pax/Makefile  Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.40 2019/08/15 21:05:16 uwe Exp $
+#      $NetBSD: Makefile,v 1.41 2019/10/13 07:28:04 mrg Exp $
 #       @(#)Makefile   8.1 (Berkeley) 5/31/93
 
 .include <bsd.own.mk>
@@ -50,4 +50,6 @@
 DPADD+=        ${LIBRMT}
 .endif
 
+COPTS.tar.c+=  ${GCC_NO_STRINGOP_TRUNCATION}
+
 .include <bsd.prog.mk>
diff -r 959a169bd419 -r c4bc5923eccf crypto/external/bsd/netpgp/bin/netpgpverify/Makefile
--- a/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile      Sun Oct 13 06:11:31 2019 +0000
+++ b/crypto/external/bsd/netpgp/bin/netpgpverify/Makefile      Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.17 2019/09/29 23:44:58 mrg Exp $
+#      $NetBSD: Makefile,v 1.18 2019/10/13 07:28:04 mrg Exp $
 
 PROG=netpgpverify
 BINDIR=                /usr/bin
@@ -32,6 +32,8 @@
 COPTS+=        -Wno-error=implicit-fallthrough
 .endif
 
+COPTS.libverify.c+=    ${GCC_NO_FORMAT_TRUNCATION}
+
 .include <bsd.prog.mk>
 
 t tst: ${PROG}
diff -r 959a169bd419 -r c4bc5923eccf crypto/external/bsd/netpgp/lib/netpgp/Makefile
--- a/crypto/external/bsd/netpgp/lib/netpgp/Makefile    Sun Oct 13 06:11:31 2019 +0000
+++ b/crypto/external/bsd/netpgp/lib/netpgp/Makefile    Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2018/02/04 03:19:52 christos Exp $
+# $NetBSD: Makefile,v 1.4 2019/10/13 07:28:05 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -26,4 +26,6 @@
 LIBDPLIBS+=    z               ${NETBSDSRCDIR}/lib/libz
 LIBDPLIBS+=    bz2             ${NETBSDSRCDIR}/lib/libbz2
 
+COPTS.crypto.c+=       ${GCC_NO_STRINGOP_OVERFLOW}
+
 .include <bsd.lib.mk>
diff -r 959a169bd419 -r c4bc5923eccf crypto/external/bsd/netpgp/lib/verify/Makefile
--- a/crypto/external/bsd/netpgp/lib/verify/Makefile    Sun Oct 13 06:11:31 2019 +0000
+++ b/crypto/external/bsd/netpgp/lib/verify/Makefile    Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2019/09/29 23:44:58 mrg Exp $
+# $NetBSD: Makefile,v 1.12 2019/10/13 07:28:05 mrg Exp $
 
 LIB=netpgpverify
 SRCS+=b64.c
@@ -27,8 +27,7 @@
 
 .include <bsd.own.mk>
 
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
-COPTS+=        -Wno-error=implicit-fallthrough
-.endif
+COPTS+=                        ${${ACTIVE_CC} == "gcc":? -Wno-implicit-fallthrough :}
+COPTS.libverify.c+=    ${GCC_NO_FORMAT_TRUNCATION}
 
 .include <bsd.lib.mk>
diff -r 959a169bd419 -r c4bc5923eccf crypto/external/bsd/openssh/bin/ssh-agent/Makefile
--- a/crypto/external/bsd/openssh/bin/ssh-agent/Makefile        Sun Oct 13 06:11:31 2019 +0000
+++ b/crypto/external/bsd/openssh/bin/ssh-agent/Makefile        Sun Oct 13 07:28:04 2019 +0000
@@ -1,8 +1,10 @@
-#      $NetBSD: Makefile,v 1.2 2010/11/21 19:19:22 adam Exp $
+#      $NetBSD: Makefile,v 1.3 2019/10/13 07:28:05 mrg Exp $
 
 BINDIR=/usr/bin
 
 PROG=  ssh-agent
 SRCS=  ssh-agent.c ssh-pkcs11-client.c
 
+COPTS.ssh-agent.c+=    ${GCC_NO_FORMAT_TRUNCATION}
+
 .include <bsd.prog.mk>
diff -r 959a169bd419 -r c4bc5923eccf crypto/external/bsd/openssh/bin/ssh-keygen/Makefile
--- a/crypto/external/bsd/openssh/bin/ssh-keygen/Makefile       Sun Oct 13 06:11:31 2019 +0000
+++ b/crypto/external/bsd/openssh/bin/ssh-keygen/Makefile       Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.5 2019/10/12 18:32:21 christos Exp $
+#      $NetBSD: Makefile,v 1.6 2019/10/13 07:28:05 mrg Exp $
 
 BINDIR=        /usr/bin
 
@@ -7,4 +7,6 @@
 
 COPTS.ssh-keygen.c=    -Wno-pointer-sign
 
+COPTS.ssh-keygen.c+=   ${GCC_NO_FORMAT_TRUNCATION}
+
 .include <bsd.prog.mk>
diff -r 959a169bd419 -r c4bc5923eccf crypto/external/bsd/openssh/bin/ssh/Makefile
--- a/crypto/external/bsd/openssh/bin/ssh/Makefile      Sun Oct 13 06:11:31 2019 +0000
+++ b/crypto/external/bsd/openssh/bin/ssh/Makefile      Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.14 2018/04/06 18:58:59 christos Exp $
+#      $NetBSD: Makefile,v 1.15 2019/10/13 07:28:05 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -23,4 +23,6 @@
 DPADD+=        ${LIBGSSAPI} ${LIBHEIMNTLM} ${LIBKRB5_DPADD}
 .endif
 
+COPTS.sshconnect.c+=   ${GCC_NO_FORMAT_TRUNCATION}
+
 .include <bsd.prog.mk>
diff -r 959a169bd419 -r c4bc5923eccf crypto/external/bsd/openssh/bin/sshd/Makefile
--- a/crypto/external/bsd/openssh/bin/sshd/Makefile     Sun Oct 13 06:11:31 2019 +0000
+++ b/crypto/external/bsd/openssh/bin/sshd/Makefile     Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.18 2019/10/12 18:32:21 christos Exp $
+#      $NetBSD: Makefile,v 1.19 2019/10/13 07:28:05 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -58,8 +58,6 @@
 DPADD+=        ${LIBLDAP} ${LIBSSL} ${LIBLBER}
 .endif
 
-.include <bsd.prog.mk>
-
 LDADD+=        -lcrypt -lutil
 DPADD+=        ${LIBCRYPT} ${LIBUTIL}
 
@@ -72,3 +70,8 @@
 LDADD+=        -lblacklist
 DPADD+=        ${LIBBLACKLIST}
 .endif
+
+COPTS.sshlogin.c+=     ${GCC_NO_STRINGOP_TRUNCATION}
+COPTS.ldapauth.c+=     ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_STRINGOP_OVERFLOW}
+
+.include <bsd.prog.mk>
diff -r 959a169bd419 -r c4bc5923eccf crypto/external/bsd/openssh/lib/Makefile
--- a/crypto/external/bsd/openssh/lib/Makefile  Sun Oct 13 06:11:31 2019 +0000
+++ b/crypto/external/bsd/openssh/lib/Makefile  Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.28 2019/10/12 18:32:22 christos Exp $
+#      $NetBSD: Makefile,v 1.29 2019/10/13 07:28:05 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -120,4 +120,7 @@
 COPTS.umac.c+=         -O0
 .endif
 
+COPTS.hostfile.c+=     ${GCC_NO_FORMAT_TRUNCATION}
+COPTS.sshkey.c+=       ${GCC_NO_FORMAT_TRUNCATION}
+
 .include <bsd.lib.mk>
diff -r 959a169bd419 -r c4bc5923eccf external/bsd/am-utils/bin/amd/Makefile
--- a/external/bsd/am-utils/bin/amd/Makefile    Sun Oct 13 06:11:31 2019 +0000
+++ b/external/bsd/am-utils/bin/amd/Makefile    Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.12 2017/05/21 15:28:38 riastradh Exp $
+#      $NetBSD: Makefile,v 1.13 2019/10/13 07:28:05 mrg Exp $
 
 .include "${.CURDIR}/../Makefile.inc"
 
@@ -73,5 +73,6 @@
        echo '#define BUILD_HOST "'unknown'"' >> ${.TARGET}
        echo '#define BUILD_DATE "'unknown'"' >> ${.TARGET}
 
+COPTS.sun_map.c+=      ${GCC_NO_STRINGOP_TRUNCATION}
 
 .include <bsd.prog.mk>
diff -r 959a169bd419 -r c4bc5923eccf external/bsd/fetch/lib/Makefile
--- a/external/bsd/fetch/lib/Makefile   Sun Oct 13 06:11:31 2019 +0000
+++ b/external/bsd/fetch/lib/Makefile   Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2019/10/10 02:30:43 kre Exp $
+# $NetBSD: Makefile,v 1.15 2019/10/13 07:28:05 mrg Exp $
 
 LIB=           fetch
 SRCS=          fetch.c common.c ftp.c http.c file.c
@@ -36,8 +36,6 @@
 CFLAGS+=       -Wno-macro-redefined # _REENTRANT redefined
 .endif
 
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc"
-COPTS.http.c += -Wno-error=stringop-truncation
-.endif
+COPTS.http.c+= ${GCC_NO_STRINGOP_TRUNCATION}
 
 .include <bsd.lib.mk>
diff -r 959a169bd419 -r c4bc5923eccf external/bsd/flex/bin/Makefile
--- a/external/bsd/flex/bin/Makefile    Sun Oct 13 06:11:31 2019 +0000
+++ b/external/bsd/flex/bin/Makefile    Sun Oct 13 07:28:04 2019 +0000
@@ -1,5 +1,5 @@
 #      from: @(#)Makefile      5.4 (Berkeley) 6/24/90
-#      $NetBSD: Makefile,v 1.14 2019/09/29 23:44:58 mrg Exp $
+#      $NetBSD: Makefile,v 1.15 2019/10/13 07:28:06 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
@@ -78,4 +78,7 @@
 . endif
 .endif
 
+COPTS.filter.c+=       ${GCC_NO_FORMAT_TRUNCATION}
+COPTS.misc.c+=         ${GCC_NO_FORMAT_TRUNCATION}
+
 .include <bsd.prog.mk>
diff -r 959a169bd419 -r c4bc5923eccf external/bsd/ipf/Makefile.inc
--- a/external/bsd/ipf/Makefile.inc     Sun Oct 13 06:11:31 2019 +0000
+++ b/external/bsd/ipf/Makefile.inc     Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.3 2017/01/11 12:19:43 joerg Exp $
+#      $NetBSD: Makefile.inc,v 1.4 2019/10/13 07:28:06 mrg Exp $
 
 WARNS?=        1       # XXX -Wcast-qual -Wshadow
 CWARNFLAGS.clang+=     -Wno-format -Wno-tautological-compare \
@@ -32,6 +32,8 @@
 
 CLEANFILES+=   y.tab.c y.tab.h
 
+COPTS+=        ${GCC_NO_STRINGOP_TRUNCATION}
+
 .PATH: ${UDIST}        \
        ${UDIST}/lib    \
        ${UDIST}/tools  \
diff -r 959a169bd419 -r c4bc5923eccf external/bsd/ipf/bin/ipftest/Makefile
--- a/external/bsd/ipf/bin/ipftest/Makefile     Sun Oct 13 06:11:31 2019 +0000
+++ b/external/bsd/ipf/bin/ipftest/Makefile     Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.6 2019/09/29 23:44:58 mrg Exp $
+#      $NetBSD: Makefile,v 1.7 2019/10/13 07:28:06 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -109,4 +109,6 @@
 . endif
 .endif
 
+COPTS.fil.c+=  ${GCC_NO_STRINGOP_OVERFLOW}
+
 .include <bsd.prog.mk>
diff -r 959a169bd419 -r c4bc5923eccf external/bsd/iscsi/lib/Makefile
--- a/external/bsd/iscsi/lib/Makefile   Sun Oct 13 06:11:31 2019 +0000
+++ b/external/bsd/iscsi/lib/Makefile   Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2012/01/01 01:19:20 wrstuden Exp $
+# $NetBSD: Makefile,v 1.5 2019/10/13 07:28:06 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -23,4 +23,6 @@
 
 LIBDPLIBS+=      pthread  ${.CURDIR}/../../../../lib/libpthread
 
+COPTS.target.c+=       ${GCC_NO_FORMAT_TRUNCATION}
+
 .include <bsd.lib.mk>
diff -r 959a169bd419 -r c4bc5923eccf external/bsd/libarchive/lib/libarchive/Makefile
--- a/external/bsd/libarchive/lib/libarchive/Makefile   Sun Oct 13 06:11:31 2019 +0000
+++ b/external/bsd/libarchive/lib/libarchive/Makefile   Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.10 2019/07/24 14:07:17 joerg Exp $
+#      $NetBSD: Makefile,v 1.11 2019/10/13 07:28:06 mrg Exp $
 
 .include <bsd.init.mk>
 
@@ -455,4 +455,7 @@
 COPTS.archive_read_support_format_mtree.c += -Wno-error=implicit-fallthrough
 .endif
 
+COPTS.target.c+=       ${GCC_NO_STRINGOP_TRUNCATION}
+COPTS.archive_write_set_format_iso9660.c+=     ${GCC_NO_STRINGOP_TRUNCATION}
+
 .include <bsd.lib.mk>
diff -r 959a169bd419 -r c4bc5923eccf external/bsd/libpcap/lib/Makefile
--- a/external/bsd/libpcap/lib/Makefile Sun Oct 13 06:11:31 2019 +0000
+++ b/external/bsd/libpcap/lib/Makefile Sun Oct 13 07:28:04 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2019/10/01 16:02:12 christos Exp $  
+# $NetBSD: Makefile,v 1.26 2019/10/13 07:28:06 mrg Exp $       
 
 USE_SHLIBDIR=yes
 .include <bsd.own.mk>
@@ -165,10 +165,9 @@
 
 COPTS.bpf_image.c+=    -Wno-format-nonliteral
 
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
-COPTS.pcap.c+=         -Wno-error=format-truncation
-COPTS.gencode.c+=      -Wno-error=implicit-fallthrough
-.endif
+COPTS.gencode.c+=      ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}
+COPTS.pcap.c+=         ${GCC_NO_FORMAT_TRUNCATION}



Home | Main Index | Thread Index | Old Index