Make MDE and EdkModule packages avoid all Intel IPF compiler warnings except waning 1419.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2326 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xli24 2007-01-26 06:54:08 +00:00
parent d59f2c721b
commit 617de480bc
8 changed files with 64 additions and 76 deletions

View File

@ -441,8 +441,6 @@ BotDriverBindingStop (
EFI_USB_ATAPI_PROTOCOL *BotAtapiProtocol; EFI_USB_ATAPI_PROTOCOL *BotAtapiProtocol;
USB_BOT_DEVICE *UsbBotDev; USB_BOT_DEVICE *UsbBotDev;
EFI_USB_IO_PROTOCOL *UsbIo;
// //
// Get our context back. // Get our context back.
// //
@ -464,7 +462,6 @@ BotDriverBindingStop (
// After installing Usb-Atapi protocol onto this handle // After installing Usb-Atapi protocol onto this handle
// it will be called by upper layer drivers such as Fat // it will be called by upper layer drivers such as Fat
// //
UsbIo = UsbBotDev->UsbIo;
BotReportStatusCode ( BotReportStatusCode (
UsbBotDev->DevicePath, UsbBotDev->DevicePath,

View File

@ -84,14 +84,6 @@ ReportUsbStatusCode (
IN EFI_STATUS_CODE_VALUE Code IN EFI_STATUS_CODE_VALUE Code
); );
//
// Supported function
//
VOID
InitializeUsbIoInstance (
IN USB_IO_CONTROLLER_DEVICE *UsbIoController
);
STATIC STATIC
USB_IO_CONTROLLER_DEVICE * USB_IO_CONTROLLER_DEVICE *
CreateUsbIoControllerDevice ( CreateUsbIoControllerDevice (
@ -213,7 +205,7 @@ UsbAllocateAddress (
// //
// Found one, covert to address, and mark it use // Found one, covert to address, and mark it use
// //
AddressPool[ByteIndex] |= (1 << BitIndex); AddressPool[ByteIndex] = (UINT8) (AddressPool[ByteIndex] | (1 << BitIndex));
return (UINT8) (ByteIndex * 8 + BitIndex); return (UINT8) (ByteIndex * 8 + BitIndex);
} }
} }
@ -251,7 +243,7 @@ UsbFreeAddress (
WhichByte = (UINT8) (DevAddress / 8); WhichByte = (UINT8) (DevAddress / 8);
WhichBit = (UINT8) (DevAddress & 0x7); WhichBit = (UINT8) (DevAddress & 0x7);
AddressPool[WhichByte] &= (~(1 << WhichBit)); AddressPool[WhichByte] = (UINT8) (AddressPool[WhichByte] & (~(1 << WhichBit)));
} }
EFI_STATUS EFI_STATUS
@ -2277,7 +2269,7 @@ ParentPortReset (
ResetRootPort (ParentIoDev->BusController, HubPort, RetryTimes); ResetRootPort (ParentIoDev->BusController, HubPort, RetryTimes);
} else { } else {
DEBUG ((gUSBDebugLevel, "Reset from Hub, Addr 0x%x\n", ParentIoDev->DeviceAddress)); DEBUG ((gUSBDebugLevel, "Reset from Hub, Addr 0x%x\n", ParentIoDev->DeviceAddress));
ResetHubPort (ParentController, HubPort + 1); ResetHubPort (ParentController, (UINT8) (HubPort + 1));
} }
// //
// If we only need port reset, just return // If we only need port reset, just return
@ -2580,16 +2572,13 @@ IsDeviceDisconnected (
--*/ --*/
{ {
USB_IO_DEVICE *ParentIoDev; USB_IO_DEVICE *ParentIoDev;
USB_IO_DEVICE *UsbIoDev;
USB_IO_CONTROLLER_DEVICE *ParentController; USB_IO_CONTROLLER_DEVICE *ParentController;
UINT8 HubPort; UINT8 HubPort;
EFI_STATUS Status; EFI_STATUS Status;
EFI_USB_IO_PROTOCOL *UsbIo;
EFI_USB_PORT_STATUS PortStatus; EFI_USB_PORT_STATUS PortStatus;
ParentController = UsbIoController->Parent; ParentController = UsbIoController->Parent;
ParentIoDev = ParentController->UsbDevice; ParentIoDev = ParentController->UsbDevice;
UsbIoDev = UsbIoController->UsbDevice;
HubPort = UsbIoController->ParentPort; HubPort = UsbIoController->ParentPort;
if (ParentIoDev->DeviceAddress == 1) { if (ParentIoDev->DeviceAddress == 1) {
@ -2603,10 +2592,9 @@ IsDeviceDisconnected (
); );
} else { } else {
UsbIo = &UsbIoController->UsbIo;
Status = HubGetPortStatus ( Status = HubGetPortStatus (
&ParentController->UsbIo, &ParentController->UsbIo,
HubPort + 1, (UINT8) (HubPort + 1),
(UINT32 *) &PortStatus (UINT32 *) &PortStatus
); );
@ -3308,7 +3296,7 @@ UsbVirtualHcControlTransfer (
TransferResult TransferResult
); );
} else { } else {
IsSlowDevice = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE; IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
Status = UsbBusDev->UsbHCInterface->ControlTransfer ( Status = UsbBusDev->UsbHCInterface->ControlTransfer (
UsbBusDev->UsbHCInterface, UsbBusDev->UsbHCInterface,
DeviceAddress, DeviceAddress,
@ -3530,7 +3518,7 @@ UsbVirtualHcAsyncInterruptTransfer (
Context Context
); );
} else { } else {
IsSlowDevice = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE; IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
Status = UsbBusDev->UsbHCInterface->AsyncInterruptTransfer ( Status = UsbBusDev->UsbHCInterface->AsyncInterruptTransfer (
UsbBusDev->UsbHCInterface, UsbBusDev->UsbHCInterface,
DeviceAddress, DeviceAddress,
@ -3639,7 +3627,7 @@ UsbVirtualHcSyncInterruptTransfer (
TransferResult TransferResult
); );
} else { } else {
IsSlowDevice = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE; IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
Status = UsbBusDev->UsbHCInterface->SyncInterruptTransfer ( Status = UsbBusDev->UsbHCInterface->SyncInterruptTransfer (
UsbBusDev->UsbHCInterface, UsbBusDev->UsbHCInterface,
DeviceAddress, DeviceAddress,

View File

@ -1111,4 +1111,45 @@ UsbVirtualHcAsyncIsochronousTransfer (
--*/ --*/
; ;
EFI_STATUS
EFIAPI
UsbPortReset (
IN EFI_USB_IO_PROTOCOL *This
)
/*++
Routine Description:
Resets and reconfigures the USB controller. This function will
work for all USB devices except USB Hub Controllers.
Arguments:
This - Indicates the calling context.
Returns:
EFI_SUCCESS
EFI_INVALID_PARAMETER
EFI_DEVICE_ERROR
--*/
;
VOID
InitializeUsbIoInstance (
IN USB_IO_CONTROLLER_DEVICE *UsbIoController
)
/*++
Routine Description:
Initialize the instance of UsbIo controller
Arguments:
UsbIoController - A pointer to controller structure of UsbIo
Returns:
--*/
;
#endif #endif

View File

@ -99,13 +99,6 @@ UsbAsyncIsochronousTransfer (
IN VOID *Context OPTIONAL IN VOID *Context OPTIONAL
); );
extern
EFI_STATUS
EFIAPI
UsbPortReset (
IN EFI_USB_IO_PROTOCOL *This
);
STATIC STATIC
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI

View File

@ -234,9 +234,7 @@ USBFloppyInquiry (
{ {
ATAPI_PACKET_COMMAND Packet; ATAPI_PACKET_COMMAND Packet;
EFI_STATUS Status; EFI_STATUS Status;
EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
// //
// prepare command packet for the Inquiry Packet Command. // prepare command packet for the Inquiry Packet Command.
@ -309,10 +307,8 @@ USBFloppyRead10 (
VOID *ptrBuffer; VOID *ptrBuffer;
EFI_STATUS Status; EFI_STATUS Status;
UINT16 TimeOut; UINT16 TimeOut;
EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UINT8 Index; UINT8 Index;
UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
// //
// prepare command packet for the Inquiry Packet Command. // prepare command packet for the Inquiry Packet Command.
@ -387,6 +383,7 @@ USBFloppyRead10 (
return Status; return Status;
} }
STATIC
EFI_STATUS EFI_STATUS
USBFloppyReadCapacity ( USBFloppyReadCapacity (
IN USB_FLOPPY_DEV *UsbFloppyDevice IN USB_FLOPPY_DEV *UsbFloppyDevice
@ -410,7 +407,6 @@ USBFloppyReadCapacity (
// //
EFI_STATUS Status; EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet; ATAPI_PACKET_COMMAND Packet;
EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
// //
// used for capacity data returned from Usb Floppy // used for capacity data returned from Usb Floppy
@ -419,7 +415,6 @@ USBFloppyReadCapacity (
ZeroMem (&Data, sizeof (Data)); ZeroMem (&Data, sizeof (Data));
UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
ZeroMem (&Packet, sizeof (ATAPI_PACKET_COMMAND)); ZeroMem (&Packet, sizeof (ATAPI_PACKET_COMMAND));
Packet.Inquiry.opcode = READ_CAPACITY; Packet.Inquiry.opcode = READ_CAPACITY;
@ -473,7 +468,6 @@ USBFloppyReadFormatCapacity (
// //
EFI_STATUS Status; EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet; ATAPI_PACKET_COMMAND Packet;
EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
// //
// used for capacity data returned from Usb Floppy // used for capacity data returned from Usb Floppy
@ -482,7 +476,6 @@ USBFloppyReadFormatCapacity (
ZeroMem (&FormatData, sizeof (FormatData)); ZeroMem (&FormatData, sizeof (FormatData));
UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
ZeroMem (&Packet, sizeof (ATAPI_PACKET_COMMAND)); ZeroMem (&Packet, sizeof (ATAPI_PACKET_COMMAND));
Packet.ReadFormatCapacity.opcode = READ_FORMAT_CAPACITY; Packet.ReadFormatCapacity.opcode = READ_FORMAT_CAPACITY;
@ -556,9 +549,7 @@ UsbFloppyRequestSense (
UINT8 *Ptr; UINT8 *Ptr;
BOOLEAN SenseReq; BOOLEAN SenseReq;
ATAPI_PACKET_COMMAND Packet; ATAPI_PACKET_COMMAND Packet;
EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
*SenseCounts = 0; *SenseCounts = 0;
@ -672,11 +663,9 @@ UsbFloppyTestUnitReady (
{ {
ATAPI_PACKET_COMMAND Packet; ATAPI_PACKET_COMMAND Packet;
EFI_STATUS Status; EFI_STATUS Status;
EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UINT32 RetryIndex; UINT32 RetryIndex;
UINT32 MaximumRetryTimes; UINT32 MaximumRetryTimes;
UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
MaximumRetryTimes = 2; MaximumRetryTimes = 2;
// //
// fill command packet // fill command packet
@ -748,10 +737,8 @@ USBFloppyWrite10 (
VOID *ptrBuffer; VOID *ptrBuffer;
EFI_STATUS Status; EFI_STATUS Status;
UINT16 TimeOut; UINT16 TimeOut;
EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UINT8 Index; UINT8 Index;
UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
// //
// prepare command packet for the Write10 Packet Command. // prepare command packet for the Write10 Packet Command.
@ -863,8 +850,6 @@ UsbFloppyDetectMedia (
// a flag used to determine whether need to perform Read Capacity command. // a flag used to determine whether need to perform Read Capacity command.
// //
REQUEST_SENSE_DATA *SensePtr;
// //
// init // init
// //
@ -884,8 +869,6 @@ UsbFloppyDetectMedia (
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
SensePtr = UsbFloppyDevice->SenseData;
// //
// No Media // No Media
// //
@ -1124,7 +1107,6 @@ UsbFloppyModeSense5APage5 (
// //
EFI_STATUS Status; EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet; ATAPI_PACKET_COMMAND Packet;
EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UFI_MODE_PARAMETER_PAGE_5 ModePage5; UFI_MODE_PARAMETER_PAGE_5 ModePage5;
EFI_LBA LastBlock; EFI_LBA LastBlock;
UINT32 SectorsPerTrack; UINT32 SectorsPerTrack;
@ -1132,7 +1114,6 @@ UsbFloppyModeSense5APage5 (
UINT32 NumberOfHeads; UINT32 NumberOfHeads;
UINT32 DataBytesPerSector; UINT32 DataBytesPerSector;
UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
ZeroMem (&ModePage5, sizeof (UFI_MODE_PARAMETER_PAGE_5)); ZeroMem (&ModePage5, sizeof (UFI_MODE_PARAMETER_PAGE_5));
@ -1210,10 +1191,8 @@ UsbFloppyModeSense5APage1C (
// //
EFI_STATUS Status; EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet; ATAPI_PACKET_COMMAND Packet;
EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UFI_MODE_PARAMETER_PAGE_1C ModePage1C; UFI_MODE_PARAMETER_PAGE_1C ModePage1C;
UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
ZeroMem (&ModePage1C, sizeof (UFI_MODE_PARAMETER_PAGE_1C)); ZeroMem (&ModePage1C, sizeof (UFI_MODE_PARAMETER_PAGE_1C));
@ -1285,11 +1264,9 @@ UsbFloppyModeSense5APage3F (
// //
EFI_STATUS Status; EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet; ATAPI_PACKET_COMMAND Packet;
EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UFI_MODE_PARAMETER_HEADER Header; UFI_MODE_PARAMETER_HEADER Header;
UINT32 Size; UINT32 Size;
UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
Size = sizeof (UFI_MODE_PARAMETER_HEADER); Size = sizeof (UFI_MODE_PARAMETER_HEADER);
@ -1343,11 +1320,9 @@ UsbSCSIModeSense1APage3F (
// //
EFI_STATUS Status; EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet; ATAPI_PACKET_COMMAND Packet;
EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
SCSI_MODE_PARAMETER_HEADER6 Header; SCSI_MODE_PARAMETER_HEADER6 Header;
UINT32 Size; UINT32 Size;
UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
Size = sizeof (SCSI_MODE_PARAMETER_HEADER6); Size = sizeof (SCSI_MODE_PARAMETER_HEADER6);

View File

@ -22,15 +22,6 @@ Abstract:
--*/ --*/
EFI_STATUS
ConvertBmpToGopBlt (
IN VOID *BmpImage,
IN UINTN BmpImageSize,
IN OUT VOID **GopBlt,
IN OUT UINTN *GopBltSize,
OUT UINTN *PixelHeight,
OUT UINTN *PixelWidth
);
EFI_STATUS EFI_STATUS
GetGraphicsBitMapFromFV ( GetGraphicsBitMapFromFV (
@ -115,6 +106,7 @@ Returns:
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
STATIC
EFI_STATUS EFI_STATUS
ConvertBmpToGopBlt ( ConvertBmpToGopBlt (
IN VOID *BmpImage, IN VOID *BmpImage,
@ -450,6 +442,7 @@ Returns:
} }
Blt = NULL; Blt = NULL;
BltSize = 0;
Status = ConvertBmpToGopBlt ( Status = ConvertBmpToGopBlt (
ImageData, ImageData,
ImageSize, ImageSize,

View File

@ -189,6 +189,7 @@ EbcInterpret (
return (UINT64) VmContext.R[7]; return (UINT64) VmContext.R[7];
} }
STATIC
UINT64 UINT64
ExecuteEbcImageEntryPoint ( ExecuteEbcImageEntryPoint (
IN EFI_HANDLE ImageHandle, IN EFI_HANDLE ImageHandle,

View File

@ -48,7 +48,7 @@ IoOr8 (
IN UINT8 OrData IN UINT8 OrData
) )
{ {
return IoWrite8 (Port, IoRead8 (Port) | OrData); return IoWrite8 (Port, (UINT8) (IoRead8 (Port) | OrData));
} }
/** /**
@ -76,7 +76,7 @@ IoAnd8 (
IN UINT8 AndData IN UINT8 AndData
) )
{ {
return IoWrite8 (Port, IoRead8 (Port) & AndData); return IoWrite8 (Port, (UINT8) (IoRead8 (Port) & AndData));
} }
/** /**
@ -107,7 +107,7 @@ IoAndThenOr8 (
IN UINT8 OrData IN UINT8 OrData
) )
{ {
return IoWrite8 (Port, (IoRead8 (Port) & AndData) | OrData); return IoWrite8 (Port, (UINT8) ((IoRead8 (Port) & AndData) | OrData));
} }
/** /**
@ -328,7 +328,7 @@ IoOr16 (
IN UINT16 OrData IN UINT16 OrData
) )
{ {
return IoWrite16 (Port, IoRead16 (Port) | OrData); return IoWrite16 (Port, (UINT16) (IoRead16 (Port) | OrData));
} }
/** /**
@ -356,7 +356,7 @@ IoAnd16 (
IN UINT16 AndData IN UINT16 AndData
) )
{ {
return IoWrite16 (Port, IoRead16 (Port) & AndData); return IoWrite16 (Port, (UINT16) (IoRead16 (Port) & AndData));
} }
/** /**
@ -387,7 +387,7 @@ IoAndThenOr16 (
IN UINT16 OrData IN UINT16 OrData
) )
{ {
return IoWrite16 (Port, (IoRead16 (Port) & AndData) | OrData); return IoWrite16 (Port, (UINT16) ((IoRead16 (Port) & AndData) | OrData));
} }
/** /**
@ -1168,7 +1168,7 @@ MmioOr8 (
IN UINT8 OrData IN UINT8 OrData
) )
{ {
return MmioWrite8 (Address, MmioRead8 (Address) | OrData); return MmioWrite8 (Address, (UINT8) (MmioRead8 (Address) | OrData));
} }
/** /**
@ -1196,7 +1196,7 @@ MmioAnd8 (
IN UINT8 AndData IN UINT8 AndData
) )
{ {
return MmioWrite8 (Address, MmioRead8 (Address) & AndData); return MmioWrite8 (Address, (UINT8) (MmioRead8 (Address) & AndData));
} }
/** /**
@ -1228,7 +1228,7 @@ MmioAndThenOr8 (
IN UINT8 OrData IN UINT8 OrData
) )
{ {
return MmioWrite8 (Address, (MmioRead8 (Address) & AndData) | OrData); return MmioWrite8 (Address, (UINT8) ((MmioRead8 (Address) & AndData) | OrData));
} }
/** /**
@ -1450,7 +1450,7 @@ MmioOr16 (
IN UINT16 OrData IN UINT16 OrData
) )
{ {
return MmioWrite16 (Address, MmioRead16 (Address) | OrData); return MmioWrite16 (Address, (UINT16) (MmioRead16 (Address) | OrData));
} }
/** /**
@ -1478,7 +1478,7 @@ MmioAnd16 (
IN UINT16 AndData IN UINT16 AndData
) )
{ {
return MmioWrite16 (Address, MmioRead16 (Address) & AndData); return MmioWrite16 (Address, (UINT16) (MmioRead16 (Address) & AndData));
} }
/** /**
@ -1510,7 +1510,7 @@ MmioAndThenOr16 (
IN UINT16 OrData IN UINT16 OrData
) )
{ {
return MmioWrite16 (Address, (MmioRead16 (Address) & AndData) | OrData); return MmioWrite16 (Address, (UINT16) ((MmioRead16 (Address) & AndData) | OrData));
} }
/** /**