diff options
author | Mark Johnston <markj@FreeBSD.org> | 2018-12-19 04:54:32 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2021-06-22 19:35:49 +0000 |
commit | 4636b3ca8744eeb73562f3f950dc06ef54636d78 (patch) | |
tree | 8a35ff753780c6573c9515563c62e022cb8d4881 | |
parent | d552a12be263ee3bccfcbe7ca1f56ebb7b13f10c (diff) | |
download | src-4636b3ca8744eeb73562f3f950dc06ef54636d78.tar.gz src-4636b3ca8744eeb73562f3f950dc06ef54636d78.zip |
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)
-rw-r--r-- | sys/conf/files | 3 | ||||
-rw-r--r-- | sys/conf/kern.mk | 1 | ||||
-rw-r--r-- | sys/modules/fxp/Makefile | 2 |
3 files changed, 1 insertions, 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} |