From owner-dev-commits-src-main@freebsd.org Thu Aug 26 18:53:46 2021 Return-Path: Delivered-To: dev-commits-src-main@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 A27F066F2AF; Thu, 26 Aug 2021 18:53:46 +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 4GwX7G1Vhtz3hx3; Thu, 26 Aug 2021 18:53:46 +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 11A8815446; Thu, 26 Aug 2021 18:53:46 +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 17QIrjiQ031203; Thu, 26 Aug 2021 18:53:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17QIrjEs031202; Thu, 26 Aug 2021 18:53:45 GMT (envelope-from git) Date: Thu, 26 Aug 2021 18:53:45 GMT Message-Id: <202108261853.17QIrjEs031202@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: f643997a1761 - main - Cleanup compiler warning flags in lib/libefivar/Makefile 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: f643997a1761689ef9108d69b86d42881ea0ab1c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2021 18:53:46 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f643997a1761689ef9108d69b86d42881ea0ab1c commit f643997a1761689ef9108d69b86d42881ea0ab1c Author: Dimitry Andric AuthorDate: 2021-08-26 18:53:18 +0000 Commit: Dimitry Andric CommitDate: 2021-08-26 18:53:26 +0000 Cleanup compiler warning flags in lib/libefivar/Makefile There is no need to set -Wno-unused-parameter twice, and instead of appending to CFLAGS, append to CWARNFLAGS instead. While here, add -Wno-unused-but-set-variable for the sake of clang 13.0.0. MFC after: 3 days --- lib/libefivar/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/libefivar/Makefile b/lib/libefivar/Makefile index 3c6b17333407..c1503f4e5b62 100644 --- a/lib/libefivar/Makefile +++ b/lib/libefivar/Makefile @@ -43,8 +43,7 @@ MAN= efivar.3 CFLAGS+= -I${EFIBOOT}/include CFLAGS+= -I${.CURDIR} -I${EDK2INC} - -CFLAGS.efivar-dp-format.c=-Wno-unused-parameter +CFLAGS+= -fno-strict-aliasing MLINKS+=efivar.3 efi_set_variables_supported.3 \ efivar.3 efi_del_variable.3 \ @@ -65,4 +64,9 @@ WARNS?= 9 .include -CFLAGS+= -fno-strict-aliasing -Wno-cast-align -Wno-unused-parameter +CWARNFLAGS+= -Wno-cast-align +CWARNFLAGS+= -Wno-unused-parameter + +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000 +CWARNFLAGS+= -Wno-unused-but-set-variable +.endif