Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jun 2021 19:41:44 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4636b3ca8744 - stable/12 - Remove a use of a negative array index from fxp(4).
Message-ID:  <202106221941.15MJfiBP008882@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=4636b3ca8744eeb73562f3f950dc06ef54636d78

commit 4636b3ca8744eeb73562f3f950dc06ef54636d78
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2018-12-19 04:54:32 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-06-22 19:35:49 +0000

    Remove a use of a negative array index from fxp(4).
    
    This fixes a warning seen when compiling amd64 GENERIC with clang 7.
    Also remove the workaround added in r337324.  clang 7 and gcc 4.2
    generate the same code with or without the code change.
    
    Reviewed by:    imp (previous version)
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D18603
    
    (cherry picked from commit 0e4a3d93eefdc9730f572e8277b100eff6cf3491)
---
 sys/conf/files           | 3 +--
 sys/conf/kern.mk         | 1 -
 sys/modules/fxp/Makefile | 2 --
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/sys/conf/files b/sys/conf/files
index 4195d5d21a53..624be0a7240b 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1812,8 +1812,7 @@ dev/flash/cqspi.c		optional cqspi fdt xdma
 dev/flash/mx25l.c		optional mx25l
 dev/flash/n25q.c		optional n25q fdt
 dev/flash/qspi_if.m		optional cqspi fdt | n25q fdt
-dev/fxp/if_fxp.c		optional fxp \
-	compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS}"
+dev/fxp/if_fxp.c		optional fxp
 dev/fxp/inphy.c			optional fxp
 dev/gem/if_gem.c		optional gem
 dev/gem/if_gem_pci.c		optional gem pci
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index fd9aadb58945..9c41852c6d9d 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -25,7 +25,6 @@ NO_WUNNEEDED_INTERNAL_DECL=	-Wno-error-unneeded-internal-declaration
 NO_WSOMETIMES_UNINITIALIZED=	-Wno-error-sometimes-uninitialized
 NO_WCAST_QUAL=			-Wno-error-cast-qual
 NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare
-NO_WARRAY_BOUNDS=		-Wno-error-array-bounds
 # Several other warnings which might be useful in some cases, but not severe
 # enough to error out the whole kernel build.  Display them anyway, so there is
 # some incentive to fix them eventually.
diff --git a/sys/modules/fxp/Makefile b/sys/modules/fxp/Makefile
index 6a47028f8822..fbe14392f69f 100644
--- a/sys/modules/fxp/Makefile
+++ b/sys/modules/fxp/Makefile
@@ -6,5 +6,3 @@ KMOD=	if_fxp
 SRCS=	device_if.h bus_if.h if_fxp.c inphy.c miibus_if.h miidevs.h pci_if.h
 
 .include <bsd.kmod.mk>
-
-CWARNFLAGS+=	${NO_WARRAY_BOUNDS}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106221941.15MJfiBP008882>