SHA256
1
0
forked from pool/ovmf
ovmf/ovmf-ignore-spurious-GCC-12-warning.patch
Joey Lee 3aba478a8e Accepting request 964975 from home:marxin:branches:Virtualization
- Add GCC 12 workaround (ovmf-ignore-spurious-GCC-12-warning.patch)
  that handles: https://bugzilla.tianocore.org/show_bug.cgi?id=3816
  The same patch is already included in qemu package.

OBS-URL: https://build.opensuse.org/request/show/964975
OBS-URL: https://build.opensuse.org/package/show/Virtualization/ovmf?expand=0&rev=219
2022-03-28 08:22:15 +00:00

61 lines
2.1 KiB
Diff

diff --git a/BaseTools/Source/C/DevicePath/DevicePathUtilities.c b/BaseTools/Source/C/DevicePath/DevicePathUtilities.c
index 2ffefa8..c9fb432 100644
--- a/BaseTools/Source/C/DevicePath/DevicePathUtilities.c
+++ b/BaseTools/Source/C/DevicePath/DevicePathUtilities.c
@@ -16,6 +16,10 @@
#include "UefiDevicePathLib.h"
#include <Protocol/DevicePathUtilities.h>
+#if __GNUC__ >= 12
+# pragma GCC diagnostic ignored "-Wstringop-overflow"
+#endif
+
//
// Template for an end-of-device path node.
//
diff --git a/BaseTools/Source/C/GenFfs/GenFfs.c b/BaseTools/Source/C/GenFfs/GenFfs.c
index 949025c..be55a52 100644
--- a/BaseTools/Source/C/GenFfs/GenFfs.c
+++ b/BaseTools/Source/C/GenFfs/GenFfs.c
@@ -36,6 +36,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define UTILITY_MAJOR_VERSION 0
#define UTILITY_MINOR_VERSION 1
+#if __GNUC__ >= 12
+# pragma GCC diagnostic ignored "-Wuse-after-free"
+#endif
+
STATIC CHAR8 *mFfsFileType[] = {
NULL, // 0x00
"EFI_FV_FILETYPE_RAW", // 0x01
diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec/GenSec.c
index d54a4f9..fb40ad3 100644
--- a/BaseTools/Source/C/GenSec/GenSec.c
+++ b/BaseTools/Source/C/GenSec/GenSec.c
@@ -37,6 +37,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define UTILITY_MAJOR_VERSION 0
#define UTILITY_MINOR_VERSION 1
+#if __GNUC__ >= 12
+# pragma GCC diagnostic ignored "-Wuse-after-free"
+#endif
+
STATIC CHAR8 *mSectionTypeName[] = {
NULL, // 0x00 - reserved
"EFI_SECTION_COMPRESSION", // 0x01
diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
index 4e9b499..ab9b7cc 100644
--- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
+++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c
@@ -40,6 +40,10 @@ static unsigned g_STAT_OFFSET = 0;
#define REP_LEN_COUNT 64
+#if __GNUC__ >= 12
+# pragma GCC diagnostic ignored "-Wdangling-pointer"
+#endif
+
void LzmaEncProps_Init(CLzmaEncProps *p)
{
p->level = 5;