diff options
author | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-22 08:42:13 +0000 |
---|---|---|
committer | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-22 08:42:13 +0000 |
commit | 6b141b66195088e03b1cc879c96d61545436b376 (patch) | |
tree | 1bf45a9a8073544a1ab1c190836799121a4fa646 | |
parent | 14a0a0c53312f861fcfad16fc6b64322ca62dc77 (diff) | |
download | edk2-6b141b66195088e03b1cc879c96d61545436b376.zip edk2-6b141b66195088e03b1cc879c96d61545436b376.tar.gz edk2-6b141b66195088e03b1cc879c96d61545436b376.tar.bz2 |
Update PciCfg2.c to follow strict ANSI C spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/MdeModulePkg@3687 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | Core/Dxe/SectionExtraction/CoreSectionExtraction.c | 2 | ||||
-rw-r--r-- | Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c | 16 |
2 files changed, 13 insertions, 5 deletions
diff --git a/Core/Dxe/SectionExtraction/CoreSectionExtraction.c b/Core/Dxe/SectionExtraction/CoreSectionExtraction.c index de719f3..adc590d 100644 --- a/Core/Dxe/SectionExtraction/CoreSectionExtraction.c +++ b/Core/Dxe/SectionExtraction/CoreSectionExtraction.c @@ -1546,4 +1546,4 @@ CustomDecompressExtractSection ( CoreFreePool (ScratchBuffer);
return EFI_SUCCESS;
-}
\ No newline at end of file +}
diff --git a/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c b/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c index 9e478eb..bf1fb2d 100644 --- a/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c +++ b/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c @@ -327,16 +327,24 @@ PciCfg2Modify ( IN CONST VOID *ClearBits
)
{
- UINTN PciLibAddress;
+ UINTN PciLibAddress;
+ UINT16 ClearValue16;
+ UINT16 SetValue16;
+ UINT32 ClearValue32;
+ UINT32 SetValue32;
PciLibAddress = PciCfgAddressConvert ((EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS *) &Address);
if (Width == EfiPeiPciCfgWidthUint8) {
- PciAndThenOr8 (PciLibAddress, ~(*(UINT8 *)ClearBits), *((UINT8 *) SetBits));
+ PciAndThenOr8 (PciLibAddress, (UINT8) (~(*(UINT8 *) ClearBits)), *((UINT8 *) SetBits));
} else if (Width == EfiPeiPciCfgWidthUint16) {
- PciAndThenOr16 (PciLibAddress, ~ReadUnaligned16 ((UINT16 *) ClearBits), ReadUnaligned16 ((UINT16 *) SetBits));
+ ClearValue16 = (UINT16) (~ReadUnaligned16 ((UINT16 *) ClearBits));
+ SetValue16 = ReadUnaligned16 ((UINT16 *) SetBits);
+ PciAndThenOr16 (PciLibAddress, ClearValue16, SetValue16);
} else if (Width == EfiPeiPciCfgWidthUint32) {
- PciAndThenOr32 (PciLibAddress, ~ReadUnaligned32 ((UINT32 *) ClearBits), ReadUnaligned32 ((UINT32 *) SetBits));
+ ClearValue32 = (UINT32) (~ReadUnaligned32 ((UINT32 *) ClearBits));
+ SetValue32 = ReadUnaligned32 ((UINT32 *) SetBits);
+ PciAndThenOr32 (PciLibAddress, ClearValue32, SetValue32);
} else {
return EFI_INVALID_PARAMETER;
}
|