From nobody Fri Jul 29 18:48:37 2022 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 4Lvc3p5Tdjz4Y1sY; Fri, 29 Jul 2022 18:48:38 +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 4Lvc3p0Pl9z3t7T; Fri, 29 Jul 2022 18:48:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120518; 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=MNusC+qInHFlb08BNI/QxM4NiEdOCyzs4EZGF6neaqA=; b=SNyj6DvRWTAVVg6aoG5QU/M7cWRiHCtbD8JUfpicG7Ea/mXJ1WjKoYBz4LX6dGXoLNaEIn APrzgjoLxA+IO0s6Xp9U076xKxd/hJ26OM6fTijHlAKoLRMKjzhKamIdI+X5MraxvQ3GuV mW8+p1N7y1n+iH3NkE2HC1cChvJYQ3wCFtfNzJws++TZVwsohuG3QCb257HnznbKab+dBa UiOpRZZF7HH44jFCEhKUJgAPfihFED/rLmtpo6zDzOIPCmDgkeNKIUHLg2pl/XDg9cXB7V S+OgaaQva5VcxKTKeKvgd837XtnmR21fAprtYFjM+T44iqCE1SuJxnHFYPe7Xw== 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 4Lvc3n6W6dzm4C; Fri, 29 Jul 2022 18:48:37 +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 26TImbDp025628; Fri, 29 Jul 2022 18:48:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26TImbId025627; Fri, 29 Jul 2022 18:48:37 GMT (envelope-from git) Date: Fri, 29 Jul 2022 18:48:37 GMT Message-Id: <202207291848.26TImbId025627@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: f9d12ca07182 - stable/12 - Suppress -Wstrict-prototypes for several zlib files 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f9d12ca07182d2e2a4119a00e0bbc4cc1cd8542e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120518; 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=MNusC+qInHFlb08BNI/QxM4NiEdOCyzs4EZGF6neaqA=; b=c96uv1GCjB4lfmiNgRL2sOueB/jjLztBEunTNm8qnROMbP2FF6cadmmGTvA6qHtvYNBoZF GaccoEq0IVP8kOlDpa0khw+U2xiCQHS0UGKlNsCUZ3PARi7YASuq3aUOI4hMyKg+t6/37U 9fCkAmf3boFbtErD8qBrZm9l5MPWDFpSv/Cwr3y9c419GoD/LAHZao0o254FBW3U9br6S+ L69ZPDDlb3YaODBsB8rIMzISAjplaWO0I80AUrUkaLNFDFActg+t4cRbZmIilqEgqhxwFn fhXUXa4L5G+/CaLCsUBGh/IscUmLGzV0fR59jqHr6H+bFYySKxFw1ukrcpybkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659120518; a=rsa-sha256; cv=none; b=ycqlGIh/GQFJumfMxeVkrDg+MNlgwNfx3NEsy4VhHcf847ynoIBOyfpSw8JGNRyW6hsCTM To/oQ502A40m1t1/x3Lg/MuGztB5/VGzFYYnpqvQO/IIS9TgKqlVYuMMqtSzS3v/ms2J33 MJ703ufb9x6Praold5ohmqLyMKmx05wJuvIRd+kD0EXlJnNfZhbQAuEJKxR0eFerUCLsVn c4JsUooqp1Y57HnLIrykaw13Z+OqSwbtaLQa0BEV7m0nRf3tw4G0IyNIFoj5P5Sx4NQbDT ClBJULm0EPUa7TP+KTiXdwHXBQ9E2IagldhHT7inaXGFn/Y8Y4j7pk9ArEwikg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f9d12ca07182d2e2a4119a00e0bbc4cc1cd8542e commit f9d12ca07182d2e2a4119a00e0bbc4cc1cd8542e Author: Dimitry Andric AuthorDate: 2022-07-26 18:24:58 +0000 Commit: Dimitry Andric CommitDate: 2022-07-29 18:43:12 +0000 Suppress -Wstrict-prototypes for several zlib files Clang 15 is more strict about function definitions not matching declarations, and zlib has a lot of these, but since it is contributed code (and in K&R style to boot), suppress those warnings instead. MFC after: 3 days (cherry picked from commit e83ffec3af2e71cc64348d58481c87db9efbac92) --- sys/conf/files | 9 ++++++--- sys/conf/kern.mk | 9 +++++++++ sys/modules/zlib/Makefile | 3 +++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 6bcc36d58e35..4d39203415ea 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4140,7 +4140,8 @@ contrib/zlib/compress.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} -Wno-cast-qual" contrib/zlib/crc32.c optional crypto | geom_uzip | ipsec | \ - ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib + ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ + compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" contrib/zlib/deflate.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} -Wno-cast-qual" @@ -4151,12 +4152,14 @@ contrib/zlib/inflate.c optional crypto | geom_uzip | ipsec | \ contrib/zlib/inftrees.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/trees.c optional crypto | geom_uzip | ipsec | \ - ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib + ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ + compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" contrib/zlib/uncompr.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} -Wno-cast-qual" contrib/zlib/zutil.c optional crypto | geom_uzip | ipsec | \ - ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib + ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ + compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}" dev/zlib/zlib_mod.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib dev/zlib/zcalloc.c optional crypto | geom_uzip | ipsec | \ diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index c93be4b1b24c..67656914dd1d 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -28,6 +28,15 @@ NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare .if ${COMPILER_VERSION} >= 100000 NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation .endif +.if ${COMPILER_VERSION} >= 130000 +NO_WUNUSED_BUT_SET_VARIABLE= -Wno-unused-but-set-variable +.endif +.if ${COMPILER_VERSION} >= 140000 +NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical +.endif +.if ${COMPILER_VERSION} >= 150000 +NO_WSTRICT_PROTOTYPES= -Wno-strict-prototypes +.endif # 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/zlib/Makefile b/sys/modules/zlib/Makefile index b5f1e552c465..6391255e512b 100644 --- a/sys/modules/zlib/Makefile +++ b/sys/modules/zlib/Makefile @@ -21,5 +21,8 @@ SRCS+= zutil.c CWARNFLAGS.compress.c+=-Wno-cast-qual # compress:49 CWARNFLAGS.deflate.c+=-Wno-cast-qual # deflate.c:415 CWARNFLAGS.uncompr.c+=-Wno-cast-qual # uncompr:49 +CWARNFLAGS.crc32.c+=${NO_WSTRICT_PROTOTYPES} # crc32.c:586 +CWARNFLAGS.trees.c+=${NO_WSTRICT_PROTOTYPES} # trees.c:232 +CWARNFLAGS.zutil.c+=${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32 .include