Source-Changes-HG archive

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

[src/trunk]: src turn off various warnings for various things:



details:   https://anonhg.NetBSD.org/src/rev/8e312f11bb0e
branches:  trunk
changeset: 455001:8e312f11bb0e
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Oct 04 09:47:27 2019 +0000

description:
turn off various warnings for various things:

- file has looks bogus maybe-uninitialized
- llvm triggers an attribute violation:
  ScheduleDAGInstrs.cpp:1430:14: error: declaration of
    'llvm::raw_ostream& llvm::operator<<(llvm::raw_ostream&, const llvm::ILPValue&)'
    with attribute 'noinline' follows inline declaration [-Werror=attributes]
- ntp and pkg_install have obvious restrict violations, should be
  fixed but i'm avoiding patching upstream code in this pass
- tftp has an array bounds that doesn't seem real issue
- sysinst's partman.c has major problem with passing the same
  string as source and dest in snprintf, as a way to strcat
  with formatting which trip restrict violations.  non trivial
  to fix so for now the warning is elided.
- Xext's XEVI.c has similar issue as partman.c

everyone and GCC 8 gets these warnings turned off for now:

        -Wno-format-truncation
        -Wno-stringop-overflow
        -Wno-stringop-truncation
        -Wno-cast-function-type

as they trip a large amount of code.  most of them should be
investigated, but the few i looked at were not finding actually
real bugs, vs instances of poor coding, so skipping for now.

diffstat:

 external/bsd/file/lib/Makefile                |  4 +++-
 external/bsd/llvm/lib/libLLVMCodeGen/Makefile |  6 +++++-
 external/bsd/ntp/bin/ntp-keygen/Makefile      |  4 +++-
 external/bsd/ntp/bin/ntpd/Makefile            |  4 +++-
 external/bsd/pkg_install/lib/Makefile         |  4 +++-
 external/mit/xorg/lib/libXext/Makefile        |  4 +++-
 usr.bin/tftp/Makefile                         |  4 +++-
 usr.sbin/sysinst/Makefile.inc                 |  4 +++-
 8 files changed, 26 insertions(+), 8 deletions(-)

diffs (135 lines):

diff -r a33e7c0c3b69 -r 8e312f11bb0e external/bsd/file/lib/Makefile
--- a/external/bsd/file/lib/Makefile    Fri Oct 04 09:19:18 2019 +0000
+++ b/external/bsd/file/lib/Makefile    Fri Oct 04 09:47:27 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.11 2018/12/12 06:36:13 msaitoh Exp $
+#      $NetBSD: Makefile,v 1.12 2019/10/04 09:47:27 mrg Exp $
 #
 
 USE_FORT?= yes # data driven bugs?
@@ -41,4 +41,6 @@
        ${TOOL_SED} -e "s/X.YY/${VERSION:S/.//g}/" < ${.ALLSRC} > ${.TARGET}
 CLEANFILES+=   magic.h
 
+CFLAGS+=       ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-maybe-uninitialized :}
+
 .include <bsd.lib.mk>
diff -r a33e7c0c3b69 -r 8e312f11bb0e external/bsd/llvm/lib/libLLVMCodeGen/Makefile
--- a/external/bsd/llvm/lib/libLLVMCodeGen/Makefile     Fri Oct 04 09:19:18 2019 +0000
+++ b/external/bsd/llvm/lib/libLLVMCodeGen/Makefile     Fri Oct 04 09:47:27 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.34 2018/07/17 18:55:27 joerg Exp $
+#      $NetBSD: Makefile,v 1.35 2019/10/04 09:47:27 mrg Exp $
 
 LIB=   LLVMCodeGen
 
@@ -169,6 +169,10 @@
        WinEHPrepare.cpp \
        XRayInstrumentation.cpp
 
+.if !defined(HOSTLIB)
+COPTS.ScheduleDAGInstrs.cpp+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-attributes :}
+.endif
+
 .if defined(HOSTLIB)
 .include <bsd.hostlib.mk>
 # Crashes some versions of GCC
diff -r a33e7c0c3b69 -r 8e312f11bb0e external/bsd/ntp/bin/ntp-keygen/Makefile
--- a/external/bsd/ntp/bin/ntp-keygen/Makefile  Fri Oct 04 09:19:18 2019 +0000
+++ b/external/bsd/ntp/bin/ntp-keygen/Makefile  Fri Oct 04 09:47:27 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.5 2013/12/28 03:19:43 christos Exp $
+#      $NetBSD: Makefile,v 1.6 2019/10/04 09:47:28 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -20,4 +20,6 @@
 
 .PATH: ${DIST}
 
+COPTS.ntp-keygen.c+=   ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=restrict :}
+
 .include <bsd.prog.mk>
diff -r a33e7c0c3b69 -r 8e312f11bb0e external/bsd/ntp/bin/ntpd/Makefile
--- a/external/bsd/ntp/bin/ntpd/Makefile        Fri Oct 04 09:19:18 2019 +0000
+++ b/external/bsd/ntp/bin/ntpd/Makefile        Fri Oct 04 09:47:27 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.22 2018/02/02 01:02:39 mrg Exp $
+#      $NetBSD: Makefile,v 1.23 2019/10/04 09:47:27 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -92,4 +92,6 @@
 COPTS.ntp_control.c+=  -Wno-error=maybe-uninitialized
 .endif
 
+COPTS.ntp_loopfilter.c+=       ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=restrict :}
+
 .include <bsd.prog.mk>
diff -r a33e7c0c3b69 -r 8e312f11bb0e external/bsd/pkg_install/lib/Makefile
--- a/external/bsd/pkg_install/lib/Makefile     Fri Oct 04 09:19:18 2019 +0000
+++ b/external/bsd/pkg_install/lib/Makefile     Fri Oct 04 09:47:27 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2010/04/23 20:56:01 joerg Exp $
+# $NetBSD: Makefile,v 1.10 2019/10/04 09:47:28 mrg Exp $
 # Original from FreeBSD, no rcs id.
 
 LIBISPRIVATE=  yes
@@ -25,4 +25,6 @@
 
 CPPFLAGS+=     -DNETBSD
 
+COPTS.plist.c+=        ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=restrict :}
+
 .include <bsd.lib.mk>
diff -r a33e7c0c3b69 -r 8e312f11bb0e external/mit/xorg/lib/libXext/Makefile
--- a/external/mit/xorg/lib/libXext/Makefile    Fri Oct 04 09:19:18 2019 +0000
+++ b/external/mit/xorg/lib/libXext/Makefile    Fri Oct 04 09:47:27 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.8 2013/06/01 07:53:11 mrg Exp $
+#      $NetBSD: Makefile,v 1.9 2019/10/04 09:47:28 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -100,5 +100,7 @@
 
 PKGDIST=       ${LIB}
 
+COPTS.XEVI.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error :}
+
 .include <bsd.x11.mk>
 .include <bsd.lib.mk>
diff -r a33e7c0c3b69 -r 8e312f11bb0e usr.bin/tftp/Makefile
--- a/usr.bin/tftp/Makefile     Fri Oct 04 09:19:18 2019 +0000
+++ b/usr.bin/tftp/Makefile     Fri Oct 04 09:47:27 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.11 2013/03/29 18:53:21 rkujawa Exp $
+#      $NetBSD: Makefile,v 1.12 2019/10/04 09:47:28 mrg Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/6/93
 
 WARNS?=2
@@ -8,4 +8,6 @@
 PROG=  tftp
 SRCS=  main.c tftp.c tftpsubs.c
 
+COPTS.tftp.c+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-array-bounds :}
+
 .include <bsd.prog.mk>
diff -r a33e7c0c3b69 -r 8e312f11bb0e usr.sbin/sysinst/Makefile.inc
--- a/usr.sbin/sysinst/Makefile.inc     Fri Oct 04 09:19:18 2019 +0000
+++ b/usr.sbin/sysinst/Makefile.inc     Fri Oct 04 09:47:27 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.23 2019/09/29 23:45:02 mrg Exp $
+#      $NetBSD: Makefile.inc,v 1.24 2019/10/04 09:47:28 mrg Exp $
 #
 # Makefile for sysinst
 
@@ -126,6 +126,8 @@
 COPTS+=-Wno-format-truncation
 .endif
 
+# XXX overlapping strncpy/snprintf buffers!
+COPTS.partman.c+=      ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error :}
 
 # Host to ftp from.  Default:
 #      "ftp.NetBSD.org"



Home | Main Index | Thread Index | Old Index