diff options
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r-- | MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c | 8 | ||||
-rw-r--r-- | MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 27 | ||||
-rw-r--r-- | MdeModulePkg/Library/DxeNetLib/NetDebug.c | 8 | ||||
-rw-r--r-- | MdeModulePkg/Library/DxeNetLib/Netbuffer.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c | 2 |
5 files changed, 16 insertions, 31 deletions
diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c index 4a068eaf72..cfc8970c7c 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c @@ -229,7 +229,7 @@ IpIoIcmpHandler ( case ICMP_CODE_UNREACH_PROTOCOL:
case ICMP_CODE_UNREACH_PORT:
case ICMP_CODE_UNREACH_SRCFAIL:
- IcmpErr = ICMP_ERR_UNREACH_NET + Code;
+ IcmpErr = (ICMP_ERROR) (ICMP_ERR_UNREACH_NET + Code);
break;
@@ -266,7 +266,7 @@ IpIoIcmpHandler ( return EFI_ABORTED;
}
- IcmpErr = Code + ICMP_ERR_TIMXCEED_INTRANS;
+ IcmpErr = (ICMP_ERROR) (Code + ICMP_ERR_TIMXCEED_INTRANS);
break;
@@ -654,7 +654,7 @@ IpIoListenHandler ( if (EFI_SUCCESS == Status) {
- IpIo->PktRcvdNotify (EFI_SUCCESS, 0, &Session, Pkt, IpIo->RcvdContext);
+ IpIo->PktRcvdNotify (EFI_SUCCESS, (ICMP_ERROR) 0, &Session, Pkt, IpIo->RcvdContext);
} else {
//
// Status is EFI_ICMP_ERROR
@@ -1050,7 +1050,7 @@ IpIoAddIp ( IpIo->Controller,
IpIo->Image,
&IpInfo->ChildHandle,
- &IpInfo->Ip
+ (VOID **) &IpInfo->Ip
);
if (EFI_ERROR (Status)) {
goto ReleaseIpInfo;
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c index 88dcf76a05..dcf2309c71 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c @@ -881,7 +881,7 @@ NetLibDefaultUnload ( Status = gBS->HandleProtocol ( DeviceHandleBuffer[Index], &gEfiDriverBindingProtocolGuid, - &DriverBinding + (VOID **) &DriverBinding ); if (EFI_ERROR (Status)) { @@ -897,24 +897,10 @@ NetLibDefaultUnload ( &gEfiDriverBindingProtocolGuid, DriverBinding ); -#if (EFI_SPECIFICATION_VERSION >= 0x00020000) - Status = gBS->HandleProtocol ( - DeviceHandleBuffer[Index], - &gEfiComponentName2ProtocolGuid, - &ComponentName - ); - if (!EFI_ERROR (Status)) { - gBS->UninstallProtocolInterface ( - ImageHandle, - &gEfiComponentName2ProtocolGuid, - ComponentName - ); - } -#else Status = gBS->HandleProtocol ( DeviceHandleBuffer[Index], &gEfiComponentNameProtocolGuid, - &ComponentName + (VOID **) &ComponentName ); if (!EFI_ERROR (Status)) { gBS->UninstallProtocolInterface ( @@ -923,12 +909,11 @@ NetLibDefaultUnload ( ComponentName ); } -#endif Status = gBS->HandleProtocol ( DeviceHandleBuffer[Index], &gEfiDriverConfigurationProtocolGuid, - &DriverConfiguration + (VOID **) &DriverConfiguration ); if (!EFI_ERROR (Status)) { @@ -942,7 +927,7 @@ NetLibDefaultUnload ( Status = gBS->HandleProtocol ( DeviceHandleBuffer[Index], &gEfiDriverDiagnosticsProtocolGuid, - &DriverDiagnostics + (VOID **) &DriverDiagnostics ); if (!EFI_ERROR (Status)) { @@ -1085,7 +1070,7 @@ EFI_STATUS NetLibGetMacString ( IN EFI_HANDLE SnpHandle, IN EFI_HANDLE ImageHandle, - IN OUT CONST CHAR16 **MacString + IN OUT CHAR16 **MacString ) { EFI_STATUS Status; @@ -1126,7 +1111,7 @@ NetLibGetMacString ( // Convert the mac address into a unicode string. // for (Index = 0; Index < Mode->HwAddressSize; Index++) { - MacAddress[Index * 2] = NibbleToHexChar (Mode->CurrentAddress.Addr[Index] >> 4); + MacAddress[Index * 2] = NibbleToHexChar ((UINT8) (Mode->CurrentAddress.Addr[Index] >> 4)); MacAddress[Index * 2 + 1] = NibbleToHexChar (Mode->CurrentAddress.Addr[Index]); } diff --git a/MdeModulePkg/Library/DxeNetLib/NetDebug.c b/MdeModulePkg/Library/DxeNetLib/NetDebug.c index afcc1b3b42..ffaac1dbf7 100644 --- a/MdeModulePkg/Library/DxeNetLib/NetDebug.c +++ b/MdeModulePkg/Library/DxeNetLib/NetDebug.c @@ -214,7 +214,7 @@ SyslogSendPacket ( //
// Get the recycled transmit buffer status.
//
- Snp->GetStatus (Snp, NULL, &TxBuf);
+ Snp->GetStatus (Snp, NULL, (VOID **) &TxBuf);
if (!EFI_ERROR (gBS->CheckEvent (TimeoutEvent))) {
Status = EFI_TIMEOUT;
@@ -375,7 +375,7 @@ SyslogBuildPacket ( //
Len = 0;
Len += (UINT32) AsciiSPrint (
- Buf,
+ (CHAR8 *) Buf,
BufLen,
"<%d> %a %d %d:%d:%d ",
Pri,
@@ -388,7 +388,7 @@ SyslogBuildPacket ( Len--;
Len += (UINT32) AsciiSPrint (
- Buf + Len,
+ (CHAR8 *) (Buf + Len),
BufLen - Len,
"Tiano %a: %a (Line: %d File: %a)",
Module,
@@ -452,7 +452,7 @@ NetDebugASPrint ( }
VA_START (Marker, Format);
- AsciiVSPrint (Buf, NET_DEBUG_MSG_LEN, Format, Marker);
+ AsciiVSPrint ((CHAR8 *) Buf, NET_DEBUG_MSG_LEN, (CHAR8 *) Format, Marker);
VA_END (Marker);
return Buf;
diff --git a/MdeModulePkg/Library/DxeNetLib/Netbuffer.c b/MdeModulePkg/Library/DxeNetLib/Netbuffer.c index f32e31efbe..a9de17f7e2 100644 --- a/MdeModulePkg/Library/DxeNetLib/Netbuffer.c +++ b/MdeModulePkg/Library/DxeNetLib/Netbuffer.c @@ -1711,7 +1711,7 @@ NetbufChecksum ( // The checksum starts with an odd byte, swap
// the checksum before added to total checksum
//
- BlockSum = NET_SWAP_SHORT (BlockSum);
+ BlockSum = (UINT16) NET_SWAP_SHORT (BlockSum);
}
TotalSum = NetAddChecksum (BlockSum, TotalSum);
diff --git a/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c b/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c index 84bc295bb1..3a0075c467 100644 --- a/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c +++ b/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c @@ -287,7 +287,7 @@ UdpIoCreatePort ( Status = gBS->OpenProtocol (
UdpIo->UdpHandle,
&gEfiUdp4ProtocolGuid,
- &UdpIo->Udp,
+ (VOID **) &UdpIo->Udp,
Image,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
|