summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2022-03-24 20:04:36 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-03-28 00:51:30 +0000
commit22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c (patch)
tree39af154e7f65d5504a4b51ceab0569843c4d114e
parent85021f8cf22d1bd4114803c6c610dea5ef0059f1 (diff)
downloadedk2-22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c.tar.gz
edk2-22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c.tar.bz2
edk2-22130dcd98b4d4b76ac8d922adb4a2dbc86fa52c.zip
Basetools: turn off gcc12 warning
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 <kraxel@redhat.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-rw-r--r--BaseTools/Source/C/DevicePath/GNUmakefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/BaseTools/Source/C/DevicePath/GNUmakefile b/BaseTools/Source/C/DevicePath/GNUmakefile
index 7ca08af966..b05d2bddfa 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