From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mx.groups.io with SMTP id smtpd.web12.185.1648502997866664079 for ; Mon, 28 Mar 2022 14:29:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bsdio.com header.s=fm2 header.b=ECQlCsYb; spf=pass (domain: bsdio.com, ip: 64.147.123.24, mailfrom: rebecca@bsdio.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id B0E053201DB0; Mon, 28 Mar 2022 17:29:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 28 Mar 2022 17:29:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; bh=ZWfS220Gka0EWI sm+Jyat95OatZCBB0tE3N4hCQ7hrE=; b=ECQlCsYbUZ+t3k6exbQaZL1RH1UKA4 k7MeL9E4l+GjqT4VDNSZQU3KwdbUiOSIZwnxuf0xMvqiPrwEzduc+55l1wsDY9K7 huYoQa0DDDzXwJw27U2tgmVLD0BYNUTAbaHQzydecwzObnYTiu4f/HP92lQnlOTh f5T1goO40YCbAwGI6rqmspZPdyRwGee76K38LXPC5TlP/25lABKAHveuSJwG8+YB h9MrQI0/rUuZaR/+Y2von7ze/Kvxhu9wjL5sD8oq+9OKWVfr9K8NSsB+NB+OcisH DCS8dF5mfqJvqe056gA/InnQt8b22FLkPy45VpCm5RnxUHwxajkdmn2A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=ZWfS220Gka0EWIsm+Jyat95OatZCBB0tE3N4hCQ7h rE=; b=IsDJplOCXVoqF31faUPXTLkAn5i4VO5Rsn6Zes2qIln0f1Y4XhH/TyNzT 5gYDfH8KHdclxW+NGKcpqWHbYp7HC1gZwvBOtc+0Fe7iVHs86i2nTUx0rnaXnMf5 et8f9IWLRbpQBd75BpYeN4VEQgUeqsrgIfh99V41NOHAx7eGAo6j3NLtdivxeGR1 XOwjkKu+Ew5MtwrZhXbL9W6bFm8e+XcKq5/wFEdXWNU+H7bYPWld/2jwxhFY3uCV Hq4FQy0K/F2BOLhbqRFFCMhcjIyNctbBfWemm+vIkOTD0y53xdI4ZafO7k2GMtbs yfLPHL6QDOdRHYIf3oV1mGQKmfIww== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudehjedgudeifecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeftvggs vggttggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtffrrg htthgvrhhnpeevgffgtdfgiefhkedtleetheffueejveevudeuffffiedvgeelkefftdef heffveenucffohhmrghinhepgigtohguvgdrrghpphenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrvggsvggttggrsegsshguihhordgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Mar 2022 17:29:54 -0400 (EDT) Message-ID: <569673d3-b0b7-2857-45c6-8623b3762fd5@bsdio.com> Date: Mon, 28 Mar 2022 15:29:53 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [edk2-devel] [PATCH 3/3] Basetools: turn off gcc12 warning To: devel@edk2.groups.io, kraxel@redhat.com Cc: Pawel Polawski , Liming Gao , Yuwei Chen , Oliver Steffen , Bob Feng References: <20220324120436.939688-1-kraxel@redhat.com> <20220324120436.939688-4-kraxel@redhat.com> From: "Rebecca Cran" In-Reply-To: <20220324120436.939688-4-kraxel@redhat.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit This breaks building BaseTools with clang 13.1.6 on macOS: /Applications/Xcode.app/Contents/Developer/usr/bin/make -C DevicePath gcc  -c  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/AArch64/ -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g -O2  -Wno-error=stringop-overflow DevicePath.c -o DevicePath.o error: unknown warning option '-Werror=stringop-overflow'; did you mean '-Werror=shift-overflow'? [-Werror,-Wunknown-warning-option] -- Rebecca Cran On 3/24/22 6:04 AM, Gerd Hoffmann wrote: > In function ‘SetDevicePathEndNode’, > inlined from ‘FileDevicePath’ at DevicePathUtilities.c:857:5: > DevicePathUtilities.c:321:3: error: writing 4 bytes into a region of size 1 [-Werror=stringop-overflow=] > 321 | memcpy (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDevicePath)); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from UefiDevicePathLib.h:22, > from DevicePathUtilities.c:16: > ../Include/Protocol/DevicePath.h: In function ‘FileDevicePath’: > ../Include/Protocol/DevicePath.h:51:9: note: destination object ‘Type’ of size 1 > 51 | UINT8 Type; ///< 0x01 Hardware Device Path. > | ^~~~ > > Signed-off-by: Gerd Hoffmann > --- > BaseTools/Source/C/DevicePath/GNUmakefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile > index 7ca08af9662d..b05d2bddfa68 100644 > --- a/BaseTools/Source/C/DevicePath/GNUmakefile > +++ b/BaseTools/Source/C/DevicePath/GNUmakefile > @@ -13,6 +13,9 @@ OBJECTS = DevicePath.o UefiDevicePathLib.o DevicePathFromText.o DevicePathUtili > > include $(MAKEROOT)/Makefiles/app.makefile > > +# gcc 12 trips over device path handling > +BUILD_CFLAGS += -Wno-error=stringop-overflow > + > LIBS = -lCommon > ifeq ($(CYGWIN), CYGWIN) > LIBS += -L/lib/e2fsprogs -luuid