public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Liming Gao" <liming.gao@intel.com>
To: "Kubacki, Michael A" <michael.a.kubacki@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Wu, Hao A" <hao.a.wu@intel.com>
Subject: Re: [PATCH V2 1/2] MdeModulePkg/Variable: Initialize local variable "Variable"
Date: Mon, 25 Nov 2019 14:36:32 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E5483E4@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20191121230236.29668-2-michael.a.kubacki@intel.com>

Create PR https://github.com/tianocore/edk2/pull/197, and 
push @290a485d6043a049b611aab30f450c74b8591f35..bd85bf54c268204c7a698a96f3ccd96cd77952cd

Thanks
Liming
> -----Original Message-----
> From: Kubacki, Michael A <michael.a.kubacki@intel.com>
> Sent: Friday, November 22, 2019 7:03 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu,
> Hao A <hao.a.wu@intel.com>
> Subject: [PATCH V2 1/2] MdeModulePkg/Variable: Initialize local variable "Variable"
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2364
> 
> Fixes a new build warning in VS2012 introduced in f8ff4cca7c.
> 
> This patch initializes the local variable "Variable" in
> VariableServiceGetNextVariableInternal ().
> 
> This ensures the pointers in the structure are initialized
> in the case no variable stores exist in the list of variable
> stores.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
> Reviewed-by: Liming Gao <liming.gao@intel.com>
> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
> ---
>  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c
> b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c
> index d458f1c608..f6d187543d 100644
> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c
> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c
> @@ -551,6 +551,8 @@ VariableServiceGetNextVariableInternal (
>      return EFI_INVALID_PARAMETER;
>    }
> 
> +  ZeroMem (&Variable, sizeof (Variable));
> +
>    // Check if the variable exists in the given variable store list
>    for (StoreType = (VARIABLE_STORE_TYPE) 0; StoreType < VariableStoreTypeMax; StoreType++) {
>      if (VariableStoreList[StoreType] == NULL) {
> --
> 2.16.2.windows.1


  reply	other threads:[~2019-11-25 14:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 23:02 [PATCH V2 0/2] MdeModulePkg/Variable: Initialize local variables Kubacki, Michael A
2019-11-21 23:02 ` [PATCH V2 1/2] MdeModulePkg/Variable: Initialize local variable "Variable" Kubacki, Michael A
2019-11-25 14:36   ` Liming Gao [this message]
2019-11-21 23:02 ` [PATCH V2 2/2] MdeModulePkg/Variable: Initialize local variable "RtPtrTrack" Kubacki, Michael A
2019-11-22 11:24   ` [edk2-devel] " Philippe Mathieu-Daudé

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=4A89E2EF3DFEDB4C8BFDE51014F606A14E5483E4@SHSMSX104.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