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
This commit is contained in:
@@ -71,9 +71,9 @@ Returns:
|
||||
}
|
||||
|
||||
if (Operation == EFI_ENABLE_REGISTER) {
|
||||
OldCommand |= Command;
|
||||
OldCommand = (UINT16) (OldCommand | Command);
|
||||
} else if (Operation == EFI_DISABLE_REGISTER) {
|
||||
OldCommand &= ~(Command);
|
||||
OldCommand = (UINT16) (OldCommand & ~(Command));
|
||||
} else {
|
||||
OldCommand = Command;
|
||||
}
|
||||
|
@@ -969,6 +969,7 @@ Returns:
|
||||
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
ProcessOptionRomLight (
|
||||
IN PCI_IO_DEVICE *PciIoDevice
|
||||
@@ -1432,7 +1433,6 @@ Returns:
|
||||
// TODO: BarIndex - add argument and description to function comment
|
||||
{
|
||||
UINT32 Value;
|
||||
UINT64 BarValue64;
|
||||
UINT32 OriginalValue;
|
||||
UINT32 Mask;
|
||||
UINT32 Data;
|
||||
@@ -1441,7 +1441,6 @@ Returns:
|
||||
|
||||
OriginalValue = 0;
|
||||
Value = 0;
|
||||
BarValue64 = 0;
|
||||
|
||||
Status = BarExisted (
|
||||
PciIoDevice,
|
||||
@@ -1491,7 +1490,7 @@ Returns:
|
||||
// Need to treat it as no-bar
|
||||
//
|
||||
if (PciIoDevice->PciBar[BarIndex].Length == 0) {
|
||||
PciIoDevice->PciBar[BarIndex].BarType = 0;
|
||||
PciIoDevice->PciBar[BarIndex].BarType = (PCI_BAR_TYPE) 0;
|
||||
}
|
||||
|
||||
PciIoDevice->PciBar[BarIndex].Prefetchable = FALSE;
|
||||
|
@@ -184,7 +184,7 @@ Returns:
|
||||
Count = 1;
|
||||
}
|
||||
|
||||
Width &= 0x03;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & 0x03);
|
||||
|
||||
if ((*Offset + Count * (UINTN)(1 << Width)) - 1 >= PciIoDevice->PciBar[BarIndex].Length) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
@@ -233,7 +233,7 @@ Returns:
|
||||
//
|
||||
// If Width is EfiPciIoWidthFillUintX then convert to EfiPciIoWidthUintX
|
||||
//
|
||||
Width &= 0x03;
|
||||
Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & 0x03);
|
||||
|
||||
if (PciIoDevice->IsPciExp) {
|
||||
if ((*Offset + Count * (UINTN)(1 << Width)) - 1 >= PCI_EXP_MAX_CONFIG_OFFSET) {
|
||||
@@ -876,7 +876,7 @@ Returns:
|
||||
}
|
||||
|
||||
if (PciIoDevice->Attributes & EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE) {
|
||||
Operation = Operation + EfiPciOperationBusMasterRead64;
|
||||
Operation = (EFI_PCI_IO_PROTOCOL_OPERATION) (Operation + EfiPciOperationBusMasterRead64);
|
||||
}
|
||||
|
||||
Status = PciIoDevice->PciRootBridgeIo->Map (
|
||||
@@ -1966,10 +1966,15 @@ Returns:
|
||||
// TODO: PciDevice1 - add argument and description to function comment
|
||||
// TODO: PciDevice2 - add argument and description to function comment
|
||||
{
|
||||
BOOLEAN Existed1;
|
||||
BOOLEAN Existed2;
|
||||
|
||||
if (PciDevice1->Parent == PciDevice2->Parent) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return (PciDeviceExisted (PciDevice1->Parent, PciDevice2)|| PciDeviceExisted (PciDevice2->Parent, PciDevice1));
|
||||
Existed1 = PciDeviceExisted (PciDevice1->Parent, PciDevice2);
|
||||
Existed2 = PciDeviceExisted (PciDevice2->Parent, PciDevice1);
|
||||
|
||||
return (BOOLEAN) (Existed1 || Existed2);
|
||||
}
|
||||
|
@@ -94,6 +94,7 @@ Returns:
|
||||
EFI_NATIVE_INTERFACE,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1446,7 +1447,7 @@ Returns:
|
||||
SecondBus = 0;
|
||||
Register = 0;
|
||||
State = 0;
|
||||
Attributes = 0;
|
||||
Attributes = (EFI_HPC_PADDING_ATTRIBUTES) 0;
|
||||
BusRange = 0;
|
||||
|
||||
ResetAllPpbBusReg (Bridge, StartBusNumber);
|
||||
|
@@ -151,7 +151,6 @@ Returns:
|
||||
UINT16 OffsetPcir;
|
||||
UINT32 RomBarOffset;
|
||||
UINT32 RomBar;
|
||||
UINT64 Temp;
|
||||
EFI_STATUS retStatus;
|
||||
BOOLEAN FirstCheck;
|
||||
UINT8 *Image;
|
||||
@@ -167,7 +166,6 @@ Returns:
|
||||
Indicator = 0;
|
||||
RomImageSize = 0;
|
||||
RomInMemory = NULL;
|
||||
Temp = 0;
|
||||
CodeType = 0xFF;
|
||||
|
||||
//
|
||||
|
@@ -647,10 +647,8 @@ Returns:
|
||||
// TODO: ResType - add argument and description to function comment
|
||||
// TODO: ResUsage - add argument and description to function comment
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
PCI_RESOURCE_NODE *Node;
|
||||
|
||||
Status = 0;
|
||||
Node = NULL;
|
||||
|
||||
Node = AllocatePool (sizeof (PCI_RESOURCE_NODE));
|
||||
@@ -704,7 +702,6 @@ Returns:
|
||||
// TODO: EFI_SUCCESS - add return value to function comment
|
||||
{
|
||||
PCI_IO_DEVICE *Temp;
|
||||
EFI_STATUS Status;
|
||||
PCI_RESOURCE_NODE *IoBridge;
|
||||
PCI_RESOURCE_NODE *Mem32Bridge;
|
||||
PCI_RESOURCE_NODE *PMem32Bridge;
|
||||
@@ -789,14 +786,14 @@ Returns:
|
||||
//
|
||||
// Recursively create resouce map on this bridge
|
||||
//
|
||||
Status = CreateResourceMap (
|
||||
Temp,
|
||||
IoBridge,
|
||||
Mem32Bridge,
|
||||
PMem32Bridge,
|
||||
Mem64Bridge,
|
||||
PMem64Bridge
|
||||
);
|
||||
CreateResourceMap (
|
||||
Temp,
|
||||
IoBridge,
|
||||
Mem32Bridge,
|
||||
PMem32Bridge,
|
||||
Mem64Bridge,
|
||||
PMem64Bridge
|
||||
);
|
||||
|
||||
if (ResourceRequestExisted (IoBridge)) {
|
||||
InsertResourceNode (
|
||||
@@ -895,14 +892,14 @@ Returns:
|
||||
//
|
||||
// To do some platform specific resource padding ...
|
||||
//
|
||||
Status = ResourcePaddingPolicy (
|
||||
Bridge,
|
||||
IoNode,
|
||||
Mem32Node,
|
||||
PMem32Node,
|
||||
Mem64Node,
|
||||
PMem64Node
|
||||
);
|
||||
ResourcePaddingPolicy (
|
||||
Bridge,
|
||||
IoNode,
|
||||
Mem32Node,
|
||||
PMem32Node,
|
||||
Mem64Node,
|
||||
PMem64Node
|
||||
);
|
||||
|
||||
//
|
||||
// Degrade resource if necessary
|
||||
|
@@ -101,6 +101,7 @@ Returns:
|
||||
mNumberOfPciRomImages++;
|
||||
}
|
||||
|
||||
STATIC
|
||||
VOID
|
||||
HexToString (
|
||||
CHAR16 *String,
|
||||
@@ -134,6 +135,8 @@ Returns:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
PciRomLoadEfiDriversFromRomImage (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
@@ -307,6 +310,7 @@ Returns:
|
||||
return retStatus;
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
PciRomLoadEfiDriversFromOptionRomTable (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
|
Reference in New Issue
Block a user