From bd85bf54c268204c7a698a96f3ccd96cd77952cd Mon Sep 17 00:00:00 2001 From: "Kubacki, Michael A" Date: Fri, 22 Nov 2019 07:02:36 +0800 Subject: [PATCH 1/1] MdeModulePkg/Variable: Initialize local variable "RtPtrTrack" 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 "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 Cc: Michael D Kinney Cc: Jian J Wang Cc: Hao A Wu Signed-off-by: Michael Kubacki Reviewed-by: Liming Gao Reviewed-by: Jian J Wang --- .../Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c index d525998ae3..2cf0ed32ae 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c @@ -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 -- 2.39.2