Skip to content

Commit

Permalink
MdeModulePkg/Variable: Initialize local variable "RtPtrTrack"
Browse files Browse the repository at this point in the history
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2364

Fixes a new build warning in VS2012 introduced in f8ff4cc.

This patch initializes the local variable "RtPtrTrack" in
FindVariableInRuntimeCache ().

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: Jian J Wang <jian.j.wang@intel.com>
  • Loading branch information
Kubacki, Michael A authored and mergify[bot] committed Nov 25, 2019
1 parent bbb5b0d commit bd85bf5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,8 @@ FindVariableInRuntimeCache (
return EFI_INVALID_PARAMETER;
}

ZeroMem (&RtPtrTrack, sizeof (RtPtrTrack));

//
// The UEFI specification restricts Runtime Services callers from invoking the same or certain other Runtime Service
// functions prior to completion and return from a previous Runtime Service call. These restrictions prevent
Expand Down

0 comments on commit bd85bf5

Please sign in to comment.