From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: zhichao.gao@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Thu, 15 Aug 2019 21:09:47 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2019 21:07:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,391,1559545200"; d="scan'208";a="188699537" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga002.jf.intel.com with ESMTP; 15 Aug 2019 21:07:55 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 15 Aug 2019 21:07:55 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 15 Aug 2019 21:07:54 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.62]) with mapi id 14.03.0439.000; Fri, 16 Aug 2019 12:07:52 +0800 From: "Gao, Zhichao" To: "devel@edk2.groups.io" , "Zhang, Shenglei" CC: "Carsey, Jaben" , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Initialize local variables Thread-Topic: [edk2-devel] [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Initialize local variables Thread-Index: AQHVUywhH0EKcCNBPEOli5MFO7vxaqb89ayQ Date: Fri, 16 Aug 2019 04:07:51 +0000 Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B823111@SHSMSX101.ccr.corp.intel.com> References: <20190815054138.16604-1-shenglei.zhang@intel.com> In-Reply-To: <20190815054138.16604-1-shenglei.zhang@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 Return-Path: zhichao.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Zhichao Gao Thanks, Zhichao > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Zhang, Shenglei > Sent: Thursday, August 15, 2019 1:42 PM > To: devel@edk2.groups.io > Cc: Carsey, Jaben ; Ni, Ray ; > Gao, Zhichao > Subject: [edk2-devel] [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: > Initialize local variables >=20 > At latest edk2 version, there is build failure when building ShellPkg wi= th > VS2012x86, which results from uninitialized local variables. >=20 > Cc: Jaben Carsey > Cc: Ray Ni > Cc: Zhichao Gao > Signed-off-by: Shenglei Zhang > --- > .../Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 8 ++++++++ > .../Library/UefiShellAcpiViewCommandLib/AcpiView.c | 10 ++++++++++ > 2 files changed, 18 insertions(+) >=20 > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > index 2d6ff80e299e..94bafa22ef4c 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > @@ -121,6 +121,10 @@ VerifyChecksum ( > UINT8 Checksum; > UINTN OriginalAttribute; >=20 > + // > + // set local variables to suppress incorrect compiler/analyzer > + warnings // OriginalAttribute =3D 0; > ByteCount =3D 0; > Checksum =3D 0; >=20 > @@ -472,6 +476,10 @@ ParseAcpi ( > BOOLEAN HighLight; > UINTN OriginalAttribute; >=20 > + // > + // set local variables to suppress incorrect compiler/analyzer > + warnings // OriginalAttribute =3D 0; > Offset =3D 0; >=20 > // Increment the Indent > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > index 9feb2df2078f..de0851dd5fba 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > @@ -211,6 +211,10 @@ ProcessTableReportOptions ( > BOOLEAN Log; > BOOLEAN HighLight; >=20 > + // > + // set local variables to suppress incorrect compiler/analyzer > + warnings // OriginalAttribute =3D 0; > SignaturePtr =3D (UINT8*)(UINTN)&Signature; > Log =3D FALSE; > HighLight =3D GetColourHighlighting (); @@ -347,6 +351,12 @@ AcpiView= ( > PARSE_ACPI_TABLE_PROC RsdpParserProc; > BOOLEAN Trace; >=20 > + // > + // set local variables to suppress incorrect compiler/analyzer > + warnings // EfiConfigurationTable =3D NULL; OriginalAttribute =3D 0= ; > + > // Search the table for an entry that matches the ACPI Table Guid > FoundAcpiTable =3D FALSE; > for (Index =3D 0; Index < SystemTable->NumberOfTableEntries; Index++)= { > -- > 2.18.0.windows.1 >=20 >=20 >=20