[edk2-devel] [PATCH V2 2/2] MdeModulePkg/Variable: Initialize local variable "RtPtrTrack"
Philippe Mathieu-Daudé via Groups.Io
philmd=redhat.com at groups.io
Fri Nov 22 11:24:59 UTC 2019
On 11/22/19 12:02 AM, Kubacki, Michael A wrote:
> 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 <liming.gao at intel.com>
> Cc: Michael D Kinney <michael.d.kinney at intel.com>
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Hao A Wu <hao.a.wu at intel.com>
> Signed-off-by: Michael Kubacki <michael.a.kubacki at intel.com>
> Reviewed-by: Liming Gao <liming.gao at intel.com>
> Reviewed-by: Jian J Wang <jian.j.wang at intel.com>
> ---
> MdeModulePkg/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
>
Reviewed-by: Philippe Mathieu-Daude <philmd at redhat.com>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#51182): https://edk2.groups.io/g/devel/message/51182
Mute This Topic: https://groups.io/mt/61215213/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list