From nobody Wed Mar 22 19:35:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PhdxL2D6Mz41Crl; Wed, 22 Mar 2023 19:35:50 +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 4PhdxL1ByRz4DV5; Wed, 22 Mar 2023 19:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679513750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wrOOSHVt10DS+g0Al5FX9O2EpfKLeOONxQN6BxvtmXk=; b=iQIon5guKpthQiBBV1cWViW41EvUwgKQBZXgyrlD6EOZQF+Z1JZiq53uRI2tvRlBJlN2qH CIp7cDHv9hKhsOuYikZwFcQNa1d7DMyNXsxZi9eNzMgLpekeKfYDVQ9RD+xEy6SO7C+HGW N9KLdugCPntrvNyuci9kbIFSOJCyGMMqKlWyUo/eCKjJGzTTTgvQDLXWpXJmzQofnTZsgL FHJwrJxH2e8Rx5YIg0+t2wasijoL/dC79wf+4NUt6r6bXozjUrfBFpFy/drpBgGan7UE0E zl8g4WJM3TJ/L4i5D4J9VMAYrK4tHkqb+1SI1EApLgJLT4BM29uZXH6P6KdVNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679513750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wrOOSHVt10DS+g0Al5FX9O2EpfKLeOONxQN6BxvtmXk=; b=gQDdbdSLaj5RM7GUDbf9zAAtqlSQIUrLBgkKCw4ZE+5e8R27dDie2PVGrgRlCkQ16LP9/Q M+u2QRQsQbgBdu8MMr02KJ9yw22I/ed3Dy3v4vL9p0io8QZei4Vmu6VBKiiA+VyrkNpeLB dY2icD0uObpTypuc2CIgzXnfurwyu41DNiHC2cL/tLFcdQ7N1CYQnR427KGzIcA+fzMpgZ //rCZIGoWLDBRNxPdPSrtij4Ax4+8Iww03lD9Y+W7TNNOIluNxmv2yk0gb7L3BdQlbGjE3 JVb5jreYfzSb3KzTFCaVvlQ6fCyzKVtwmdKufdZHEXwDvfv/4iSenYFEtM7b9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679513750; a=rsa-sha256; cv=none; b=yIjeE0pO9Ipkr84WG+BFlFBWM3nea/AZBfY/e2LribeaGrapCGBDQiH3M7cPYDdJWNyDSm eXo5GpaEG7SOAGGV33DiAYa85vHZz8K1tuyHRbRy0sdPZ7Zx6l9R2OzBmpFsxjTAn0bAcE NT5txAMF8arErufQC8sEMLjjt/WEv5oZ7zPFH9uPnRqbOThCbHL54wJK39+j5bgvr0toKs 68tukBjMXUvnZgYIZ0ue6OF3bTyCmkV/sIT5FZmkLpbnBBf2AAp14uFATh6p1hIUE0z6v6 IQCjJCrfUt6FjA0wgeoelPaJROrsUJbRlkXrtdcvHn9STlHM8+DbxJXmKlhQEw== 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 4PhdxL063Fz15tr; Wed, 22 Mar 2023 19:35:50 +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 32MJZnW3019822; Wed, 22 Mar 2023 19:35:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32MJZnL9019821; Wed, 22 Mar 2023 19:35:49 GMT (envelope-from git) Date: Wed, 22 Mar 2023 19:35:49 GMT Message-Id: <202303221935.32MJZnL9019821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4ffeb3b88ed2 - main - sys: Stop enabling -Wnested-externs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ffeb3b88ed228e72e13abe1be888c77c6ede95d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4ffeb3b88ed228e72e13abe1be888c77c6ede95d commit 4ffeb3b88ed228e72e13abe1be888c77c6ede95d Author: John Baldwin AuthorDate: 2023-03-22 19:35:09 +0000 Commit: John Baldwin CommitDate: 2023-03-22 19:35:09 +0000 sys: Stop enabling -Wnested-externs. clang doesn't implement this warning, so violations are only caught by GCC. It is also no longer a common practice to use this as it was in the original BSD code, so the need for the warning is not as important as when it was used to do cleanups 20 years ago. A recent commit (c3179891f897d840f578a5139839fcacb587c96d) triggers this warning on GCC, but that commit uses nested externs purposefully. Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D39214 --- sys/conf/kern.mk | 2 +- sys/conf/kern.pre.mk | 1 - sys/conf/kmod.mk | 3 +-- sys/modules/pms/Makefile | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 74c47479ab9e..a80d6211c182 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -3,7 +3,7 @@ # # Warning flags for compiling the kernel and components of the kernel: # -CWARNFLAGS?= -Wall -Wnested-externs -Wstrict-prototypes \ +CWARNFLAGS?= -Wall -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Wcast-qual \ -Wundef -Wno-pointer-sign ${FORMAT_EXTENSIONS} \ -Wmissing-include-dirs -fdiagnostics-show-option \ diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index ca04e348808d..ec5c1d331533 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -225,7 +225,6 @@ CDDL_CFLAGS= \ -Wno-duplicate-decl-specifier \ -Wno-missing-braces \ -Wno-missing-prototypes \ - -Wno-nested-externs \ -Wno-parentheses \ -Wno-pointer-arith \ -Wno-strict-prototypes \ diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 9c681bad3c80..83506ece333d 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -551,8 +551,7 @@ OPENZFS_CFLAGS= \ -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h -OPENZFS_CWARNFLAGS= \ - -Wno-nested-externs +OPENZFS_CWARNFLAGS= .include .include diff --git a/sys/modules/pms/Makefile b/sys/modules/pms/Makefile index 4dc00b75ff6f..3219b3e0e4a3 100644 --- a/sys/modules/pms/Makefile +++ b/sys/modules/pms/Makefile @@ -22,7 +22,6 @@ CFLAGS+=-fms-extensions CFLAGS+=-Wredundant-decls CFLAGS+=-Wunused-variable -CFLAGS+=-Wnested-externs CFLAGS+=-Woverflow CFLAGS+=-Wmissing-prototypes CFLAGS+=-Wparentheses