summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-04-21 20:55:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-05-11 16:59:18 +0100
commit49b6d84fe368ba602caf4d0353a2bf07c28117bc (patch)
tree59caa4fe2feb5a7ee768fed08a98e689d21a86c3
parent9169daddaac3b4a835f294af2802ac3a67ca713e (diff)
downloadpoky-49b6d84fe368ba602caf4d0353a2bf07c28117bc.tar.gz
ovmf: Fix build with gcc7
backport a patch which fixing warnings with gcc7 (From OE-Core rev: 74fb6043f6d74b84f7efc282ac6cfc54fcb71882) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch45
-rw-r--r--meta/recipes-core/ovmf/ovmf_git.bb1
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch b/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch
new file mode 100644
index 0000000000..0529a27b16
--- /dev/null
+++ b/meta/recipes-core/ovmf/ovmf/0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch
@@ -0,0 +1,45 @@
1From 73692710d50da1f421b0e6ddff784ca3135389b3 Mon Sep 17 00:00:00 2001
2From: Dandan Bi <dandan.bi@intel.com>
3Date: Sat, 1 Apr 2017 10:31:14 +0800
4Subject: [PATCH] MdeModulePkg/UefiHiiLib:Fix incorrect comparison expression
5
6Fix the incorrect comparison between pointer and constant zero character.
7
8https://bugzilla.tianocore.org/show_bug.cgi?id=416
9
10V2: The pointer StringPtr points to a string returned
11by ExtractConfig/ExportConfig, if it is NULL, function
12InternalHiiIfrValueAction will return FALSE. So in
13current usage model, the StringPtr can not be NULL before
14using it, so we can add ASSERT here.
15
16Cc: Eric Dong <eric.dong@intel.com>
17Cc: Liming Gao <liming.gao@intel.com>
18Contributed-under: TianoCore Contribution Agreement 1.0
19Signed-off-by: Dandan Bi <dandan.bi@intel.com>
20Reviewed-by: Eric Dong <eric.dong@intel.com>
21---
22Upstream-Status: Backport
23
24 MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 5 +++--
25 1 file changed, 3 insertions(+), 2 deletions(-)
26
27diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
28index 8579501..46ca7bc 100644
29--- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
30+++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
31@@ -2180,8 +2180,9 @@ InternalHiiIfrValueAction (
32 }
33
34 StringPtr = ConfigAltResp;
35-
36- while (StringPtr != L'\0') {
37+ ASSERT (StringPtr != NULL);
38+
39+ while (*StringPtr != L'\0') {
40 //
41 // 1. Find <ConfigHdr> GUID=...&NAME=...&PATH=...
42 //
43--
441.9.1
45
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb
index 73fdfc6239..9d988e9d41 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -14,6 +14,7 @@ SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \
14 file://0002-ovmf-update-path-to-native-BaseTools.patch \ 14 file://0002-ovmf-update-path-to-native-BaseTools.patch \
15 file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \ 15 file://0003-BaseTools-makefile-adjust-to-build-in-under-bitbake.patch \
16 file://VfrCompile-increase-path-length-limit.patch \ 16 file://VfrCompile-increase-path-length-limit.patch \
17 file://0001-MdeModulePkg-UefiHiiLib-Fix-incorrect-comparison-exp.patch \
17 " 18 "
18 19
19SRC_URI_append_class-target = " \ 20SRC_URI_append_class-target = " \