diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-25 06:15:58 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-25 06:15:58 +0000 |
commit | 1cc8ee7861a59532700a6fd1255689576eda0f52 (patch) | |
tree | 7708d058115302ba08d7879965e8864467958e93 /EdkModulePkg/Universal/PCD | |
parent | 582510249f2fb1334e507b99421b9485f6b89159 (diff) | |
download | edk2-platforms-1cc8ee7861a59532700a6fd1255689576eda0f52.tar.xz |
Partially make EdkModulePkg pass intel IPF compiler with /W4 /WX switched on.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2313 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/PCD')
-rw-r--r-- | EdkModulePkg/Universal/PCD/Dxe/Pcd.c | 24 | ||||
-rw-r--r-- | EdkModulePkg/Universal/PCD/Dxe/Service.c | 16 | ||||
-rw-r--r-- | EdkModulePkg/Universal/PCD/Pei/Pcd.c | 14 | ||||
-rw-r--r-- | EdkModulePkg/Universal/PCD/Pei/Service.c | 9 |
4 files changed, 38 insertions, 25 deletions
diff --git a/EdkModulePkg/Universal/PCD/Dxe/Pcd.c b/EdkModulePkg/Universal/PCD/Dxe/Pcd.c index 641cb706ee..2fd9cab523 100644 --- a/EdkModulePkg/Universal/PCD/Dxe/Pcd.c +++ b/EdkModulePkg/Universal/PCD/Dxe/Pcd.c @@ -525,12 +525,17 @@ DxePcdGetNextToken ( )
{
EFI_STATUS Status;
+ BOOLEAN PeiExMapTableEmpty;
+ BOOLEAN DxeExMapTableEmpty;
if (!FeaturePcdGet (PcdDxePcdDatabaseTraverseEnabled)) {
return EFI_UNSUPPORTED;
}
Status = EFI_NOT_FOUND;
+ PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
+ DxeExMapTableEmpty = DXE_EXMAP_TABLE_EMPTY;
+
//
// Scan the local token space
//
@@ -557,12 +562,12 @@ DxePcdGetNextToken ( return EFI_SUCCESS;
}
- if (PEI_EXMAP_TABLE_EMPTY && DXE_EXMAP_TABLE_EMPTY) {
+ if (PeiExMapTableEmpty && DxeExMapTableEmpty) {
*TokenNumber = PCD_INVALID_TOKEN_NUMBER;
return EFI_NOT_FOUND;
}
- if (!PEI_EXMAP_TABLE_EMPTY) {
+ if (!PeiExMapTableEmpty) {
Status = ExGetNextTokeNumber (
Guid,
TokenNumber,
@@ -577,7 +582,7 @@ DxePcdGetNextToken ( return Status;
}
- if (!DXE_EXMAP_TABLE_EMPTY) {
+ if (!DxeExMapTableEmpty) {
Status = ExGetNextTokeNumber (
Guid,
TokenNumber,
@@ -591,7 +596,7 @@ DxePcdGetNextToken ( return Status;
}
-
+STATIC
EFI_GUID **
GetDistinctTokenSpace (
IN OUT UINTN *ExMapTableSize,
@@ -649,6 +654,8 @@ DxePcdGetNextTokenSpace ( EFI_GUID **PeiTokenSpaceTable;
EFI_GUID **DxeTokenSpaceTable;
BOOLEAN Match;
+ BOOLEAN PeiExMapTableEmpty;
+ BOOLEAN DxeExMapTableEmpty;
if (!FeaturePcdGet (PcdDxePcdDatabaseTraverseEnabled)) {
return EFI_UNSUPPORTED;
@@ -656,7 +663,10 @@ DxePcdGetNextTokenSpace ( ASSERT (Guid != NULL);
- if (PEI_EXMAP_TABLE_EMPTY && DXE_EXMAP_TABLE_EMPTY) {
+ PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
+ DxeExMapTableEmpty = DXE_EXMAP_TABLE_EMPTY;
+
+ if (PeiExMapTableEmpty && DxeExMapTableEmpty) {
if (*Guid != NULL) {
return EFI_NOT_FOUND;
} else {
@@ -668,7 +678,7 @@ DxePcdGetNextTokenSpace ( if (TmpTokenSpaceBuffer[0] == NULL) {
PeiTokenSpaceTableSize = 0;
- if (!PEI_EXMAP_TABLE_EMPTY) {
+ if (!PeiExMapTableEmpty) {
PeiTokenSpaceTableSize = PEI_EXMAPPING_TABLE_SIZE;
PeiTokenSpaceTable = GetDistinctTokenSpace (&PeiTokenSpaceTableSize,
mPcdDatabase->PeiDb.Init.ExMapTable,
@@ -677,7 +687,7 @@ DxePcdGetNextTokenSpace ( CopyMem (TmpTokenSpaceBuffer, PeiTokenSpaceTable, sizeof (EFI_GUID*) * PeiTokenSpaceTableSize);
}
- if (!DXE_EXMAP_TABLE_EMPTY) {
+ if (!DxeExMapTableEmpty) {
DxeTokenSpaceTableSize = DXE_EXMAPPING_TABLE_SIZE;
DxeTokenSpaceTable = GetDistinctTokenSpace (&DxeTokenSpaceTableSize,
mPcdDatabase->DxeDb.Init.ExMapTable,
diff --git a/EdkModulePkg/Universal/PCD/Dxe/Service.c b/EdkModulePkg/Universal/PCD/Dxe/Service.c index 51e16624ef..8ff45d38da 100644 --- a/EdkModulePkg/Universal/PCD/Dxe/Service.c +++ b/EdkModulePkg/Universal/PCD/Dxe/Service.c @@ -28,7 +28,6 @@ GetWorker ( )
{
UINT32 *LocalTokenNumberTable;
- UINT16 *SizeTable;
EFI_GUID *GuidTable;
UINT16 *StringTable;
EFI_GUID *Guid;
@@ -76,14 +75,11 @@ GetWorker ( // EBC compiler is very choosy. It may report warning about comparison
// between UINTN and 0 . So we add 1 in each size of the
// comparison.
- IsPeiDb = (TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE;
+ IsPeiDb = (BOOLEAN) ((TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE);
LocalTokenNumberTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.LocalTokenNumberTable :
mPcdDatabase->DxeDb.Init.LocalTokenNumberTable;
- SizeTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.SizeTable:
- mPcdDatabase->DxeDb.Init.SizeTable;
-
TokenNumber = IsPeiDb ? TokenNumber :
TokenNumber - PEI_LOCAL_TOKEN_NUMBER;
@@ -496,7 +492,7 @@ GetSkuEnabledTokenNumber ( -
+STATIC
VOID
InvokeCallbackOnSet (
UINT32 ExTokenNumber,
@@ -597,7 +593,7 @@ SetWorker ( // EBC compiler is very choosy. It may report warning about comparison
// between UINTN and 0 . So we add 1 in each size of the
// comparison.
- IsPeiDb = (TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE;
+ IsPeiDb = (BOOLEAN) ((TokenNumber + 1 < PEI_LOCAL_TOKEN_NUMBER + 1) ? TRUE : FALSE);
LocalTokenNumberTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.LocalTokenNumberTable :
mPcdDatabase->DxeDb.Init.LocalTokenNumberTable;
@@ -895,7 +891,7 @@ GetExPcdTokenNumber ( }
-
+STATIC
SKU_ID *
GetSkuIdArray (
IN UINTN LocalTokenNumberTableIdx,
@@ -923,7 +919,7 @@ GetSkuIdArray ( }
-
+STATIC
UINTN
GetSizeTableIndexA (
IN UINTN LocalTokenNumberTableIdx,
@@ -980,7 +976,7 @@ GetSizeTableIndexA ( -
+STATIC
UINTN
GetSizeTableIndex (
IN UINTN LocalTokenNumberTableIdx,
diff --git a/EdkModulePkg/Universal/PCD/Pei/Pcd.c b/EdkModulePkg/Universal/PCD/Pei/Pcd.c index 33bc4e1069..b8ed5b2119 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Pcd.c +++ b/EdkModulePkg/Universal/PCD/Pei/Pcd.c @@ -502,11 +502,14 @@ PeiPcdGetNextToken ( DYNAMICEX_MAPPING *ExMapTable;
UINTN i;
BOOLEAN Found;
-
+ BOOLEAN PeiExMapTableEmpty;
+
if (!FeaturePcdGet (PcdPeiPcdDatabaseTraverseEnabled)) {
return EFI_UNSUPPORTED;
}
-
+
+ PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
+
if (Guid == NULL) {
if (*TokenNumber > PEI_NEX_TOKEN_NUMBER) {
return EFI_NOT_FOUND;
@@ -517,7 +520,7 @@ PeiPcdGetNextToken ( }
return EFI_SUCCESS;
} else {
- if (PEI_EXMAP_TABLE_EMPTY) {
+ if (PeiExMapTableEmpty) {
*TokenNumber = PCD_INVALID_TOKEN_NUMBER;
return EFI_SUCCESS;
}
@@ -597,6 +600,7 @@ PeiPcdGetNextTokenSpace ( DYNAMICEX_MAPPING *ExMapTable;
UINTN i;
BOOLEAN Found;
+ BOOLEAN PeiExMapTableEmpty;
if (!FeaturePcdGet (PcdPeiPcdDatabaseTraverseEnabled)) {
return EFI_UNSUPPORTED;
@@ -604,7 +608,9 @@ PeiPcdGetNextTokenSpace ( ASSERT (Guid != NULL);
- if (PEI_EXMAP_TABLE_EMPTY) {
+ PeiExMapTableEmpty = PEI_EXMAP_TABLE_EMPTY;
+
+ if (PeiExMapTableEmpty) {
if (*Guid != NULL) {
return EFI_NOT_FOUND;
} else {
diff --git a/EdkModulePkg/Universal/PCD/Pei/Service.c b/EdkModulePkg/Universal/PCD/Pei/Service.c index 521c88b7fc..c228d3b383 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Service.c +++ b/EdkModulePkg/Universal/PCD/Pei/Service.c @@ -154,6 +154,7 @@ BuildPcdDatabase ( @retval EFI_SUCCESS Operation successful.
@retval EFI_NOT_FOUND Variablel not found.
--*/
+STATIC
EFI_STATUS
GetHiiVariable (
IN CONST EFI_GUID *VariableGuid,
@@ -205,7 +206,7 @@ GetHiiVariable ( }
-
+STATIC
UINT32
GetSkuEnabledTokenNumber (
UINT32 LocalTokenNumber,
@@ -261,7 +262,7 @@ GetSkuEnabledTokenNumber ( -
+STATIC
VOID
InvokeCallbackOnSet (
UINTN ExTokenNumber,
@@ -651,7 +652,7 @@ GetPcdDatabase ( }
-
+STATIC
SKU_ID *
GetSkuIdArray (
IN UINTN LocalTokenNumberTableIdx,
@@ -672,7 +673,7 @@ GetSkuIdArray ( }
-
+STATIC
UINTN
GetSizeTableIndex (
IN UINTN LocalTokenNumberTableIdx,
|