From nobody Sun Dec 25 11:59:48 2022 X-Original-To: dev-commits-src-main@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 4NfzxJ6TXVz1J15l; Sun, 25 Dec 2022 11:59:48 +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 4NfzxJ5tJbz40cN; Sun, 25 Dec 2022 11:59:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671969588; 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=spZCQpPxeeZbw4w63emEJbAwrRDiA8IIMQi8SNn7tlI=; b=pZfUw/13zylGiIExBOPbzl76mcwOrwOlu4pk5F1O/ZDaXiequZdvHZJ8tIEG3/wxVxMYHO McbFj8/YRL1NrnctqOA4+VQiMXcyJbuCvwY9J7hW9djI0yajZqCYxYXChaPlKekvbDsNWW Ga/SEP8ECs6TZUOvGT3uEWEL9fH83PGM4yDet9krA8VA1ENSurmV56gxtHmHIl6HYgKFJv WdiUv1+pkxh0E0JrZsyu2sCPKcK4KQnnO+rkzEhDND43rFNazVgBNcCXN08gSywinXUHz3 DOUZCo++XfLKNhk7gho7PrOxwiY7kVZNWBnbLT4OLlL3CAdxRTj0L6I+vR701A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671969588; 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=spZCQpPxeeZbw4w63emEJbAwrRDiA8IIMQi8SNn7tlI=; b=uC5Ts0BoqY7/Eaxq1XQmKKFxM9P6hm9C9poLl1ihoeL82zfbHT0VudT4CF4MjV1BdoFTcv ZnazG9Urt3b2Y6tT3NdGzOp+U3t2jq1YDJQ8Vd8INpu/RKhxeanytVEhPnSmM++JZKmYJw MOjDUC0WTdGuWKWnLlDKQNRSRFRkj+qjW09JcsjVAgwcdpabxMeMDQUehk0aS8rt0JO+Yb 6I6g7VOv00hTK6okWwriVU+parFv87kAA73r7nyYzyPLCNM48A8Gn/zAqkgtfdlISEATq4 3WfDOYhdpoOo4T4ZkqpIvgUNfsgEekYlQaXq/oKIc1ijTxV6XzNHykroo1eHMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671969588; a=rsa-sha256; cv=none; b=UoWqjRWIsDrWXpsyGhxO2BCRe8qkZxntqutTrVq/g/zYajkzap1jc/wwIKOlPJwWEBz03M YHHvQ9TdZCjMXn1C4u3vYMAxoRS21POhNfx2NjAT7KSNbMMvCInaeJ1vyJGVx9Jbx1Vh3C on7i3MXndNtl6OrYv6zklBxaIHyUQvbwx4kc55TI1eZzDUlqd1isVyLuKr6lZcOb3VE6Y+ rDwoDqpXnqybfacVyq2WTi00ZuEYuYdvrXzAK0SVJw+ENb3nkbTyIh57TiR8PMcbxmuq/k XPdyfXeebyOtvPOAzj5DOgx8zgEA21UMllYqiw9tB7oLFwABP6X9I7jI2q08VA== 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 4NfzxJ4pwQzr6y; Sun, 25 Dec 2022 11:59:48 +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 2BPBxmkh029955; Sun, 25 Dec 2022 11:59:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BPBxmAG029954; Sun, 25 Dec 2022 11:59:48 GMT (envelope-from git) Date: Sun, 25 Dec 2022 11:59:48 GMT Message-Id: <202212251159.2BPBxmAG029954@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 526f57bf85a2 - main - Update CWARNFLAGS in bsd.sys.mk and CWARNEXTRA in kern.mk for clang 15. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org 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/main X-Git-Reftype: branch X-Git-Commit: 526f57bf85a2b9b113c55ded47b932abc8567bc5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=526f57bf85a2b9b113c55ded47b932abc8567bc5 commit 526f57bf85a2b9b113c55ded47b932abc8567bc5 Author: Dimitry Andric AuthorDate: 2022-07-25 10:29:58 +0000 Commit: Dimitry Andric CommitDate: 2022-12-25 11:58:22 +0000 Update CWARNFLAGS in bsd.sys.mk and CWARNEXTRA in kern.mk for clang 15. MFC after: 3 days --- share/mk/bsd.sys.mk | 17 +++++++++++++++-- sys/conf/kern.mk | 4 ++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index a220c9d173ed..43359fed29c7 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -49,8 +49,11 @@ CWARNFLAGS+= -Werror CWARNFLAGS+= -Wall -Wno-format-y2k .endif # WARNS >= 2 .if ${WARNS} >= 3 -CWARNFLAGS+= -W -Wno-unused-parameter -Wstrict-prototypes\ - -Wmissing-prototypes -Wpointer-arith +CWARNFLAGS+= -W -Wno-unused-parameter +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 150000 +CWARNFLAGS+= -Wstrict-prototypes +.endif +CWARNFLAGS+= -Wmissing-prototypes -Wpointer-arith .endif # WARNS >= 3 .if ${WARNS} >= 4 CWARNFLAGS+= -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow\ @@ -59,6 +62,11 @@ CWARNFLAGS+= -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow\ CWARNFLAGS+= -Wcast-align .endif # !NO_WCAST_ALIGN !NO_WCAST_ALIGN.${COMPILER_TYPE} .endif # WARNS >= 4 +.if ${WARNS} >= 5 +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000 +CWARNFLAGS+= -Wstrict-prototypes +.endif +.endif # WARNS >= 4 .if ${WARNS} >= 6 CWARNFLAGS+= -Wchar-subscripts -Wnested-externs \ -Wold-style-definition @@ -86,6 +94,11 @@ CWARNFLAGS.clang+= -Wno-unused-const-variable .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000 CWARNFLAGS.clang+= -Wno-error=unused-but-set-variable .endif +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000 +CWARNFLAGS.clang+= -Wno-error=array-parameter +CWARNFLAGS.clang+= -Wno-error=deprecated-non-prototype +CWARNFLAGS.clang+= -Wno-error=unused-but-set-parameter +.endif .endif # WARNS <= 6 .if ${WARNS} <= 3 CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-unused-value\ diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index c44e5065da70..9b33c7b82125 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -45,6 +45,10 @@ CWARNEXTRA?= -Wno-error=tautological-compare -Wno-error=empty-body \ -Wno-error=pointer-sign CWARNEXTRA+= -Wno-error=shift-negative-value CWARNEXTRA+= -Wno-address-of-packed-member +.if ${COMPILER_VERSION} >= 150000 +CWARNEXTRA+= -Wno-error=array-parameter +CWARNEXTRA+= -Wno-error=deprecated-non-prototype +.endif .endif # clang .if ${COMPILER_TYPE} == "gcc"