]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c
OvmfPkg:Fix VS2012 build failure
[mirror_edk2.git] / OvmfPkg / Library / BaseMemEncryptSevLib / X64 / VirtualMemory.c
index c1bfa35d7a300a013ee1b53dcea9b6930ad33085..5d6289df10d9f85c2ecdbcf7f1acc5f58017ae8a 100644 (file)
@@ -2,7 +2,7 @@
 \r
   Virtual Memory Management Services to set or clear the memory encryption bit\r
 \r
-  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
   Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
@@ -596,6 +596,11 @@ SetMemoryEncDec (
   BOOLEAN                        IsWpEnabled;\r
   RETURN_STATUS                  Status;\r
 \r
+  //\r
+  // Set PageMapLevel4Entry to suppress incorrect compiler/analyzer warnings.\r
+  //\r
+  PageMapLevel4Entry = NULL;\r
+\r
   DEBUG ((\r
     DEBUG_VERBOSE,\r
     "%a:%a: Cr3Base=0x%Lx Physical=0x%Lx Length=0x%Lx Mode=%a CacheFlush=%u\n",\r