]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Gcd/Gcd.c
MdeModulePkg/Gcd: Suppress incorrect compiler/analyzer warnings
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Gcd / Gcd.c
index 31ddf9c3bb516e7dd34b92813f408d993c36aa7a..e17e98230b79beb063c5a00cbe38c251e86e9fc3 100644 (file)
@@ -3,7 +3,7 @@
   The GCD services are used to manage the memory and I/O regions that\r
   are accessible to the CPU that is executing the DXE core.\r
 \r
   The GCD services are used to manage the memory and I/O regions that\r
   are accessible to the CPU that is executing the DXE core.\r
 \r
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, 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
 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
@@ -866,6 +866,10 @@ CoreConvertSpace (
   }\r
   ASSERT (TopEntry != NULL && BottomEntry != NULL);\r
 \r
   }\r
   ASSERT (TopEntry != NULL && BottomEntry != NULL);\r
 \r
+  //\r
+  // Initialize CpuArchAttributes to suppress incorrect compiler/analyzer warnings.\r
+  //\r
+  CpuArchAttributes = 0;\r
   if (Operation == GCD_SET_ATTRIBUTES_MEMORY_OPERATION) {\r
     //\r
     // Call CPU Arch Protocol to attempt to set attributes on the range\r
   if (Operation == GCD_SET_ATTRIBUTES_MEMORY_OPERATION) {\r
     //\r
     // Call CPU Arch Protocol to attempt to set attributes on the range\r