]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c
Update code to support VS2013 tool chain.
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / RuntimeDxe / VariableSmmRuntimeDxe.c
index e7b10149fb15fc791577dff78e521c87e3eaa2e6..7ca3326a887b0a323e60d33f2c5dda8fce51a9a3 100644 (file)
@@ -4,7 +4,7 @@
   and volatile storage space and install variable architecture protocol\r
   based on SMM variable module.\r
 \r
-Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -195,6 +195,7 @@ VariableLockRequestToLock (
   }\r
 \r
   VariableNameSize = StrSize (VariableName);\r
+  VariableToLock   = NULL;\r
 \r
   //\r
   // If VariableName exceeds SMM payload limit. Return failure\r
@@ -272,6 +273,7 @@ RuntimeServiceGetVariable (
 \r
   TempDataSize          = *DataSize;\r
   VariableNameSize      = StrSize (VariableName);\r
+  SmmVariableHeader     = NULL;\r
 \r
   //\r
   // If VariableName exceeds SMM payload limit. Return failure\r
@@ -374,6 +376,7 @@ RuntimeServiceGetNextVariableName (
 \r
   OutVariableNameSize   = *VariableNameSize;\r
   InVariableNameSize    = StrSize (VariableName);\r
+  SmmGetNextVariableName = NULL;\r
 \r
   //\r
   // If input string exceeds SMM payload limit. Return failure\r
@@ -491,6 +494,7 @@ RuntimeServiceSetVariable (
   }\r
 \r
   VariableNameSize      = StrSize (VariableName);\r
+  SmmVariableHeader     = NULL;\r
 \r
   //\r
   // If VariableName or DataSize exceeds SMM payload limit. Return failure\r
@@ -561,6 +565,8 @@ RuntimeServiceQueryVariableInfo (
   UINTN                                     PayloadSize;\r
   SMM_VARIABLE_COMMUNICATE_QUERY_VARIABLE_INFO *SmmQueryVariableInfo;\r
 \r
+  SmmQueryVariableInfo = NULL;\r
+\r
   if(MaximumVariableStorageSize == NULL || RemainingVariableStorageSize == NULL || MaximumVariableSize == NULL || Attributes == 0) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r