From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.9959.1648123491253231651 for ; Thu, 24 Mar 2022 05:04:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=b1/SXg0O; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648123490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/RyukNGgWjWHP0PvsDojFmtsPdr5G0nrBjnePRIcoa0=; b=b1/SXg0O3GRjmGvWghlPcXU+iupUae2mNsTS5AkUTdKKb/SgVzs7CZziWwqBrz7BJ0FYDC VmDOBt5SQNlbHAvZFEX7ozhQnqoiM6mMDJw0A2zbiQMSx6EPa69ruo0RxnnAQZTEumC5GM D6LpvYr9J3s+Pdm7h8/WzhGkxrC2R/g= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-88-0FCgn98oOyqZtumf1jS2nw-1; Thu, 24 Mar 2022 08:04:45 -0400 X-MC-Unique: 0FCgn98oOyqZtumf1jS2nw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9434185A5A8; Thu, 24 Mar 2022 12:04:44 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.196.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0B1BC9E62; Thu, 24 Mar 2022 12:04:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 59CBF180061B; Thu, 24 Mar 2022 13:04:36 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Pawel Polawski , Liming Gao , Yuwei Chen , Oliver Steffen , Bob Feng , Gerd Hoffmann Subject: [PATCH 3/3] Basetools: turn off gcc12 warning Date: Thu, 24 Mar 2022 13:04:36 +0100 Message-Id: <20220324120436.939688-4-kraxel@redhat.com> In-Reply-To: <20220324120436.939688-1-kraxel@redhat.com> References: <20220324120436.939688-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 -- 2.35.1