From owner-dev-commits-src-all@freebsd.org Tue Jun 22 19:41:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D284F661BF3; Tue, 22 Jun 2021 19:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G8cGc5PjRz3rTs; Tue, 22 Jun 2021 19:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1D4716F15; Tue, 22 Jun 2021 19:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15MJfix2008883; Tue, 22 Jun 2021 19:41:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15MJfiBP008882; Tue, 22 Jun 2021 19:41:44 GMT (envelope-from git) Date: Tue, 22 Jun 2021 19:41:44 GMT Message-Id: <202106221941.15MJfiBP008882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 4636b3ca8744 - stable/12 - Remove a use of a negative array index from fxp(4). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4636b3ca8744eeb73562f3f950dc06ef54636d78 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2021 19:41:44 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4636b3ca8744eeb73562f3f950dc06ef54636d78 commit 4636b3ca8744eeb73562f3f950dc06ef54636d78 Author: Mark Johnston AuthorDate: 2018-12-19 04:54:32 +0000 Commit: Dimitry Andric 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 - -CWARNFLAGS+= ${NO_WARRAY_BOUNDS}