]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/PCD/Pei/Pcd.c
Partially make EdkModulePkg pass intel IPF compiler with /W4 /WX switched on.
[mirror_edk2.git] / EdkModulePkg / Universal / PCD / Pei / Pcd.c
index 33bc4e1069edb063fc5745010d4c0fb5078c3654..b8ed5b2119f649885a26e2165ec4584b9a15944f 100644 (file)
@@ -502,11 +502,14 @@ PeiPcdGetNextToken (
   DYNAMICEX_MAPPING   *ExMapTable;\r
   UINTN               i;\r
   BOOLEAN             Found;\r
-    \r
+  BOOLEAN             PeiExMapTableEmpty;\r
+\r
   if (!FeaturePcdGet (PcdPeiPcdDatabaseTraverseEnabled)) {\r
     return EFI_UNSUPPORTED;\r
   }\r
-    \r
+\r
+  PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;\r
+\r
   if (Guid == NULL) {\r
     if (*TokenNumber > PEI_NEX_TOKEN_NUMBER) {\r
       return EFI_NOT_FOUND;\r
@@ -517,7 +520,7 @@ PeiPcdGetNextToken (
     }\r
     return EFI_SUCCESS;\r
   } else {\r
-    if (PEI_EXMAP_TABLE_EMPTY) {\r
+    if (PeiExMapTableEmpty) {\r
       *TokenNumber = PCD_INVALID_TOKEN_NUMBER;\r
       return EFI_SUCCESS;\r
     }\r
@@ -597,6 +600,7 @@ PeiPcdGetNextTokenSpace (
   DYNAMICEX_MAPPING   *ExMapTable;\r
   UINTN               i;\r
   BOOLEAN             Found;\r
+  BOOLEAN             PeiExMapTableEmpty;\r
 \r
   if (!FeaturePcdGet (PcdPeiPcdDatabaseTraverseEnabled)) {\r
     return EFI_UNSUPPORTED;\r
@@ -604,7 +608,9 @@ PeiPcdGetNextTokenSpace (
 \r
   ASSERT (Guid != NULL);\r
 \r
-  if (PEI_EXMAP_TABLE_EMPTY) {\r
+  PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;\r
+\r
+  if (PeiExMapTableEmpty) {\r
     if (*Guid != NULL) {\r
       return EFI_NOT_FOUND;\r
     } else {\r