From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D9EF421CB87AE for ; Mon, 25 Dec 2017 02:21:03 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Dec 2017 02:25:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,454,1508828400"; d="scan'208";a="15014221" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 25 Dec 2017 02:25:56 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 25 Dec 2017 02:25:51 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 25 Dec 2017 02:25:51 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.159]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Mon, 25 Dec 2017 18:25:49 +0800 From: "Dong, Eric" To: "Gao, Liming" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] MdeModulePkg HiiDataBaseDxe: Initialize the local variable before reference Thread-Index: AQHTfWqi6Srn9hHfTEOfzDAQsqqOtKNT2ouA Date: Mon, 25 Dec 2017 10:25:49 +0000 Message-ID: References: <1514197479-10428-1-git-send-email-liming.gao@intel.com> In-Reply-To: <1514197479-10428-1-git-send-email-liming.gao@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] MdeModulePkg HiiDataBaseDxe: Initialize the local variable before reference X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 10:21:04 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Limi= ng Gao Sent: Monday, December 25, 2017 6:25 PM To: edk2-devel@lists.01.org Subject: [edk2] [Patch] MdeModulePkg HiiDataBaseDxe: Initialize the local v= ariable before reference Make VS2012x86 and GCC48 pass build Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao --- MdeModulePkg/Universal/HiiDatabaseDxe/Database.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePk= g/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 =3D=3D NULL) { return EFI_NOT_FOUND; } + StartBit =3D 0; + EndBit =3D 0; ByteOffset =3D IfrQuestionHdr->VarStoreInfo.VarOffset; if (BitFieldQuestion) { BitOffset =3D IfrQuestionHdr->VarStoreInfo.VarOffset; @@ -818,6 +820,7 @@ UpdateDefaultSettingInFormPackage ( =20 ZeroMem (&VarStoreQuestionHeader, sizeof (VarStoreQuestionHeader)); PackageLength =3D FormPackage->FormPkgHdr.Length - sizeof (EFI_HII_PACKA= GE_HEADER); + Width =3D 0; IfrOffset =3D 0; IfrScope =3D 0; IfrOpHdr =3D (EFI_IFR_OP_HEADER *) FormPackage->IfrData; --=20 2.8.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel