From 718b6fe9a3965defcabc0f0216593af46329c071 Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Mon, 25 Dec 2017 18:24:19 +0800 Subject: MdeModulePkg HiiDataBaseDxe: Initialize the local variable before reference Make VS2012x86 and GCC48 pass build Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Reviewed-by: Eric Dong --- MdeModulePkg/Universal/HiiDatabaseDxe/Database.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe') diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c index ffcd9ec..7441c19 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c @@ -739,6 +739,8 @@ FindQuestionDefaultSetting ( if (VariableHeader == NULL) { return EFI_NOT_FOUND; } + StartBit = 0; + EndBit = 0; ByteOffset = IfrQuestionHdr->VarStoreInfo.VarOffset; if (BitFieldQuestion) { BitOffset = IfrQuestionHdr->VarStoreInfo.VarOffset; @@ -818,6 +820,7 @@ UpdateDefaultSettingInFormPackage ( ZeroMem (&VarStoreQuestionHeader, sizeof (VarStoreQuestionHeader)); PackageLength = FormPackage->FormPkgHdr.Length - sizeof (EFI_HII_PACKAGE_HEADER); + Width = 0; IfrOffset = 0; IfrScope = 0; IfrOpHdr = (EFI_IFR_OP_HEADER *) FormPackage->IfrData; -- cgit v1.1