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=hao.a.wu@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 2E5572097FA8F for ; Thu, 2 Aug 2018 22:09:20 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2018 22:09:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,437,1526367600"; d="scan'208";a="221396095" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 02 Aug 2018 22:08:51 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Aug 2018 22:08:49 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 2 Aug 2018 22:08:49 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.81]) by shsmsx102.ccr.corp.intel.com ([169.254.2.124]) with mapi id 14.03.0319.002; Fri, 3 Aug 2018 13:08:47 +0800 From: "Wu, Hao A" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] ShellPkg/acpi: Code cleanup to pass static code checker Thread-Index: AQHUKtvMHRol359q7US40VjZC+6mF6Stel1w Date: Fri, 3 Aug 2018 05:08:47 +0000 Message-ID: References: <20180803034131.109784-1-ruiyu.ni@intel.com> In-Reply-To: <20180803034131.109784-1-ruiyu.ni@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] ShellPkg/acpi: Code cleanup to pass static code checker X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2018 05:09:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Hao Wu Best Regards, Hao Wu > -----Original Message----- > From: Ni, Ruiyu > Sent: Friday, August 03, 2018 11:42 AM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A > Subject: [PATCH] ShellPkg/acpi: Code cleanup to pass static code checker >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ruiyu Ni > Cc: Hao A Wu > --- > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c = | 2 +- > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c = | 1 + > .../Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c = | > 2 +- > 3 files changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > index 18c4983e95..5cab20023d 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > @@ -297,7 +297,7 @@ DumpUint64 ( > Val =3D *(UINT32*)(Ptr + sizeof (UINT32)); >=20 > Val <<=3D 32; > - Val |=3D *(UINT32*)Ptr; > + Val |=3D (UINT64)*(UINT32*)Ptr; >=20 > Print (Format, Val); > } > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > index 47ce93f104..4199e82ab1 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > @@ -284,6 +284,7 @@ ConvertStrToAcpiSignature ( > UINT8 Index; > CHAR8 Ptr[4]; >=20 > + ZeroMem (Ptr, sizeof (Ptr)); > Index =3D 0; >=20 > // Convert to Upper case and convert to ASCII > diff --git > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewComman > dLib.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewComman > dLib.c > index 245700a253..c6eb7087cf 100644 > --- > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewComman > dLib.c > +++ > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewComman > dLib.c > @@ -118,7 +118,7 @@ UefiShellAcpiViewCommandLibConstructor ( > gShellAcpiViewHiiHandle =3D NULL; >=20 > // Check Shell Profile Debug1 bit of the profiles mask > - if ((FixedPcdGet8 (PcdShellProfileMask) & BIT1) =3D=3D 0) { > + if ((PcdGet8 (PcdShellProfileMask) & BIT1) =3D=3D 0) { > return EFI_SUCCESS; > } >=20 > -- > 2.16.1.windows.1