Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst apply some -Wno- to ignore several new warn...



details:   https://anonhg.NetBSD.org/src/rev/22458df11cac
branches:  trunk
changeset: 378440:22458df11cac
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Apr 13 04:58:59 2021 +0000

description:
apply some -Wno- to ignore several new warnings with GCC 10.


ntp: ignore truncation beyond api sizes, and ignore wrongly
guessed underflow

tmux: ignore maybe uninitialised warning for impossible case

libbfd: signed/unsigned variables assigned in the same statement

dri/gallium: -Wno-builtin-declaration-mismatch for u_atomic.c as
it implements backend functions with different in-C-machine but
same-in-real-machine types

libXfont/libXfont2: signed/unsigned variables assigned in the same
statement

i915drm: ignore impossible maybe uninitialised warnings

sysinst: ignore an invalid string truncation issue

diffstat:

 external/bsd/ntp/bin/ntpdc/Makefile            |   4 +++-
 external/bsd/ntp/lib/libntp/Makefile           |   4 +++-
 external/bsd/tmux/usr.bin/tmux/Makefile        |   3 ++-
 external/gpl3/binutils/lib/libbfd/Makefile     |   7 ++++---
 external/mit/xorg/lib/dri/Makefile             |   4 +++-
 external/mit/xorg/lib/gallium/Makefile         |   4 +++-
 external/mit/xorg/lib/libXfont/Makefile        |   3 ++-
 external/mit/xorg/lib/libXfont2/Makefile       |   3 ++-
 sys/external/bsd/drm2/i915drm/files.i915drmkms |   8 ++++----
 sys/modules/i915drmkms/Makefile                |  13 ++++++-------
 usr.sbin/sysinst/Makefile.inc                  |   4 +++-
 11 files changed, 35 insertions(+), 22 deletions(-)

diffs (204 lines):

diff -r 90824840276b -r 22458df11cac external/bsd/ntp/bin/ntpdc/Makefile
--- a/external/bsd/ntp/bin/ntpdc/Makefile       Tue Apr 13 04:57:15 2021 +0000
+++ b/external/bsd/ntp/bin/ntpdc/Makefile       Tue Apr 13 04:58:59 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.7 2020/10/11 07:07:31 rin Exp $
+#      $NetBSD: Makefile,v 1.8 2021/04/13 04:58:59 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -24,4 +24,6 @@ CPPFLAGS+=-I${IDIST}/include -I${IDIST}/
 
 CLEANFILES+=${MAN}
 
+COPTS.ntpdc.c+=        ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-array-bounds :}
+
 .include <bsd.prog.mk>
diff -r 90824840276b -r 22458df11cac external/bsd/ntp/lib/libntp/Makefile
--- a/external/bsd/ntp/lib/libntp/Makefile      Tue Apr 13 04:57:15 2021 +0000
+++ b/external/bsd/ntp/lib/libntp/Makefile      Tue Apr 13 04:58:59 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.24 2020/05/29 20:16:07 christos Exp $
+#      $NetBSD: Makefile,v 1.25 2021/04/13 04:58:59 mrg Exp $
 
 LIBISPRIVATE=yes
 
@@ -102,5 +102,7 @@ CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIM
 .endif
 
 COPTS.timetoa.c+=      ${GCC_NO_FORMAT_TRUNCATION}
+COPTS.socktoa.c+=      ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
+COPTS.socktohost.c+=   ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
 
 .include <bsd.lib.mk>
diff -r 90824840276b -r 22458df11cac external/bsd/tmux/usr.bin/tmux/Makefile
--- a/external/bsd/tmux/usr.bin/tmux/Makefile   Tue Apr 13 04:57:15 2021 +0000
+++ b/external/bsd/tmux/usr.bin/tmux/Makefile   Tue Apr 13 04:58:59 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 2020/11/01 15:16:05 christos Exp $
+# $NetBSD: Makefile,v 1.26 2021/04/13 04:58:59 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -227,5 +227,6 @@ DPADD+=             ${LIBEVENT} ${LIBTERMINFO} ${LI
 
 COPTS.format.c += -Wno-format-nonliteral
 COPTS.utempter.c+=     ${GCC_NO_STRINGOP_TRUNCATION}
+COPTS.window-copy.c+=  ${GCC_NO_MAYBE_UNINITIALIZED}
 
 .include <bsd.prog.mk>
diff -r 90824840276b -r 22458df11cac external/gpl3/binutils/lib/libbfd/Makefile
--- a/external/gpl3/binutils/lib/libbfd/Makefile        Tue Apr 13 04:57:15 2021 +0000
+++ b/external/gpl3/binutils/lib/libbfd/Makefile        Tue Apr 13 04:58:59 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.22 2020/04/04 00:46:53 christos Exp $
+#      $NetBSD: Makefile,v 1.23 2021/04/13 04:58:59 mrg Exp $
 
 NOLINKLIB=     # defined
 NOLINT=                # defined
@@ -45,8 +45,9 @@ CPPFLAGS+=    -I${.CURDIR}/arch/${BFD_MACHI
 CPPFLAGS.elf.c +=      -O0
 .endif
 
-COPTS.pei-x86_64.c += -Wno-stack-protector
-COPTS.elfxx-mips.c += -Wno-stack-protector
+COPTS.pei-x86_64.c+=   -Wno-stack-protector
+COPTS.elfxx-mips.c+=   -Wno-stack-protector
+COPTS.elf.c+=          ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-overflow :}
 
 GSRCS=         ${G_libbfd_la_OBJECTS:libbfd.lo=lib_bfd.lo} \
                ${G_libbfd_la_DEPENDENCIES:M*.lo}
diff -r 90824840276b -r 22458df11cac external/mit/xorg/lib/dri/Makefile
--- a/external/mit/xorg/lib/dri/Makefile        Tue Apr 13 04:57:15 2021 +0000
+++ b/external/mit/xorg/lib/dri/Makefile        Tue Apr 13 04:58:59 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2020/01/25 19:05:08 christos Exp $
+# $NetBSD: Makefile,v 1.37 2021/04/13 04:58:59 mrg Exp $
 
 # Link the mesa_dri_drivers mega driver.
 
@@ -488,6 +488,8 @@ CWARNFLAGS.clang+=  -Wno-error=initialize
 
 COPTS+= -Wno-error=stack-protector
 
+COPTS.u_atomic.c+=     ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-builtin-declaration-mismatch :}
+
 .include <bsd.lib.mk>
 .else
 .include <bsd.inc.mk>
diff -r 90824840276b -r 22458df11cac external/mit/xorg/lib/gallium/Makefile
--- a/external/mit/xorg/lib/gallium/Makefile    Tue Apr 13 04:57:15 2021 +0000
+++ b/external/mit/xorg/lib/gallium/Makefile    Tue Apr 13 04:58:59 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.45 2021/02/23 15:16:43 joerg Exp $
+# $NetBSD: Makefile,v 1.46 2021/04/13 04:59:00 mrg Exp $
 
 # Link the gallium mega driver.
 
@@ -1199,6 +1199,8 @@ COPTS+=   ${${ACTIVE_CC} == "clang":? -Wa,
 COPTS.nir.c += -O1
 .endif
 
+COPTS.u_atomic.c+=     ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-builtin-declaration-mismatch :}
+
 .include <bsd.lib.mk>
 # Don't regenerate c files
 .y.c:
diff -r 90824840276b -r 22458df11cac external/mit/xorg/lib/libXfont/Makefile
--- a/external/mit/xorg/lib/libXfont/Makefile   Tue Apr 13 04:57:15 2021 +0000
+++ b/external/mit/xorg/lib/libXfont/Makefile   Tue Apr 13 04:58:59 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.11 2018/05/09 08:39:54 mrg Exp $
+#      $NetBSD: Makefile,v 1.12 2021/04/13 04:59:00 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -66,6 +66,7 @@ COPTS.register.c+=    -Wno-error
 PKGDIST=       ${LIB}
 
 CWARNFLAGS.clang+=     -Wno-tautological-compare -Wno-string-plus-int
+COPTS.ftfuncs.c+=      ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-error=overflow :}
 
 .include <bsd.x11.mk>
 .include <bsd.lib.mk>
diff -r 90824840276b -r 22458df11cac external/mit/xorg/lib/libXfont2/Makefile
--- a/external/mit/xorg/lib/libXfont2/Makefile  Tue Apr 13 04:57:15 2021 +0000
+++ b/external/mit/xorg/lib/libXfont2/Makefile  Tue Apr 13 04:58:59 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.6 2020/02/23 09:24:12 mrg Exp $
+#      $NetBSD: Makefile,v 1.7 2021/04/13 04:59:00 mrg Exp $
 
 .include <bsd.own.mk>
 
@@ -114,6 +114,7 @@ CPPFLAGS+=  -I${DESTDIR}${X11INCDIR}/free
 CPPFLAGS+=     -I${DESTDIR}${X11INCDIR}/freetype2/freetype
 
 CWARNFLAGS.clang+=     -Wno-format
+COPTS.ftfuncs.c+=      ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-error=overflow :}
 
 LIBDPLIBS=\
        Xt      ${.CURDIR}/../libXt \
diff -r 90824840276b -r 22458df11cac sys/external/bsd/drm2/i915drm/files.i915drmkms
--- a/sys/external/bsd/drm2/i915drm/files.i915drmkms    Tue Apr 13 04:57:15 2021 +0000
+++ b/sys/external/bsd/drm2/i915drm/files.i915drmkms    Tue Apr 13 04:58:59 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.i915drmkms,v 1.39 2020/02/14 04:30:05 riastradh Exp $
+#      $NetBSD: files.i915drmkms,v 1.40 2021/04/13 04:59:00 mrg Exp $
 
 version        20180827
 
@@ -25,9 +25,9 @@ makeoptions   i915drmkms      "CWARNFLAGS.i91
 
 makeoptions    i915drmkms      "CWARNFLAGS.intel_sprite.c"+="${${ACTIVE_CC} == gcc:? -Wno-maybe-uninitialized :}"
 
-makeoptions    i915drmkms      "CWARNFLAGS.intel_ddi.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
-makeoptions    i915drmkms      "CWARNFLAGS.intel_display.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
-makeoptions    i915drmkms      "CWARNFLAGS.intel_sdvo.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
+makeoptions    i915drmkms      "CWARNFLAGS.intel_ddi.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 10:? -Wno-maybe-uninitialized :} ${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? 
-Wno-implicit-fallthrough :}"
+makeoptions    i915drmkms      "CWARNFLAGS.intel_display.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :}"
+makeoptions    i915drmkms      "CWARNFLAGS.intel_sdvo.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-implicit-fallthrough :}"
 
 file   external/bsd/drm2/i915drm/i915_module.c         i915drmkms
 file   external/bsd/drm2/i915drm/i915_pci.c            i915drmkms
diff -r 90824840276b -r 22458df11cac sys/modules/i915drmkms/Makefile
--- a/sys/modules/i915drmkms/Makefile   Tue Apr 13 04:57:15 2021 +0000
+++ b/sys/modules/i915drmkms/Makefile   Tue Apr 13 04:58:59 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2020/10/18 19:56:41 christos Exp $
+# $NetBSD: Makefile,v 1.17 2021/04/13 04:59:00 mrg Exp $
 
 .include "../Makefile.inc"
 .include "../drmkms/Makefile.inc"
@@ -115,11 +115,10 @@ SRCS+=    intel_uncore.c
 
 WARNS= 3
 
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
-COPTS.intel_display.c+=        -Wno-error=implicit-fallthrough
-COPTS.intel_ddi.c+=    -Wno-error=implicit-fallthrough
-COPTS.intel_sdvo.c+=   -Wno-error=implicit-fallthrough
-.endif
-COPTS.i915_guc_submission.c += ${NO_ADDR_OF_PACKED_MEMBER}
+COPTS.intel_display.c+=                ${GCC_NO_IMPLICIT_FALLTHRU}
+COPTS.intel_ddi.c+=            ${GCC_NO_IMPLICIT_FALLTHRU}
+COPTS.intel_sdvo.c+=           ${GCC_NO_IMPLICIT_FALLTHRU}
+COPTS.intel_ddi.c+=            ${GCC_NO_MAYBE_UNINITIALIZED}
+COPTS.i915_guc_submission.c+=  ${NO_ADDR_OF_PACKED_MEMBER}
 
 .include <bsd.kmodule.mk>
diff -r 90824840276b -r 22458df11cac usr.sbin/sysinst/Makefile.inc
--- a/usr.sbin/sysinst/Makefile.inc     Tue Apr 13 04:57:15 2021 +0000
+++ b/usr.sbin/sysinst/Makefile.inc     Tue Apr 13 04:58:59 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.38 2020/11/13 17:39:06 martin Exp $
+#      $NetBSD: Makefile.inc,v 1.39 2021/04/13 04:59:00 mrg Exp $
 #
 # Makefile for sysinst
 
@@ -252,4 +252,6 @@ check-lang: msg.def msg_defs.h
        ${HOST_SH} ${MSG_CMP_SH} msg_defs.h /tmp/sysinst.en sysinstmsgs.${LANG}
        @rm /tmp/sysinst.en
 
+COPTS.util.c+= ${GCC_NO_STRINGOP_TRUNCATION}
+
 .include <bsd.prog.mk>



Home | Main Index | Thread Index | Old Index