public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Zhang, Shenglei" <shenglei.zhang@intel.com>
Cc: "Carsey, Jaben" <jaben.carsey@intel.com>, "Ni, Ray" <ray.ni@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Initialize local variables
Date: Fri, 16 Aug 2019 04:07:51 +0000	[thread overview]
Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B823111@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20190815054138.16604-1-shenglei.zhang@intel.com>

Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>

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 <jaben.carsey@intel.com>; Ni, Ray <ray.ni@intel.com>;
> Gao, Zhichao <zhichao.gao@intel.com>
> Subject: [edk2-devel] [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib:
> Initialize local variables
> 
> At latest edk2 version, there is build failure when building ShellPkg with
> VS2012x86, which results from uninitialized local variables.
> 
> Cc: Jaben Carsey <jaben.carsey@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  .../Library/UefiShellAcpiViewCommandLib/AcpiParser.c   |  8 ++++++++
>  .../Library/UefiShellAcpiViewCommandLib/AcpiView.c     | 10 ++++++++++
>  2 files changed, 18 insertions(+)
> 
> 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;
> 
> +  //
> +  // set local variables to suppress incorrect compiler/analyzer
> + warnings  //  OriginalAttribute = 0;
>    ByteCount = 0;
>    Checksum = 0;
> 
> @@ -472,6 +476,10 @@ ParseAcpi (
>    BOOLEAN HighLight;
>    UINTN   OriginalAttribute;
> 
> +  //
> +  // set local variables to suppress incorrect compiler/analyzer
> + warnings  //  OriginalAttribute = 0;
>    Offset = 0;
> 
>    // 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;
> 
> +  //
> +  // set local variables to suppress incorrect compiler/analyzer
> + warnings  //  OriginalAttribute = 0;
>    SignaturePtr = (UINT8*)(UINTN)&Signature;
>    Log = FALSE;
>    HighLight = GetColourHighlighting (); @@ -347,6 +351,12 @@ AcpiView (
>    PARSE_ACPI_TABLE_PROC    RsdpParserProc;
>    BOOLEAN                  Trace;
> 
> +  //
> +  // set local variables to suppress incorrect compiler/analyzer
> + warnings  //  EfiConfigurationTable = NULL;  OriginalAttribute = 0;
> +
>    // Search the table for an entry that matches the ACPI Table Guid
>    FoundAcpiTable = FALSE;
>    for (Index = 0; Index < SystemTable->NumberOfTableEntries; Index++) {
> --
> 2.18.0.windows.1
> 
> 
> 


      reply	other threads:[~2019-08-16  4:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15  5:41 [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Initialize local variables Zhang, Shenglei
2019-08-16  4:07 ` Gao, Zhichao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CE959C139B4C44DBEA1810E3AA6F9000B823111@SHSMSX101.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox