diff options
17 files changed, 40 insertions, 38 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c index 12d0600489..0defe736cb 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c @@ -1188,7 +1188,7 @@ Returns: }
}
- if (0x1e >= InquiryData.Peripheral_Type >= 0xa) {
+ if (0x1e >= InquiryData.Peripheral_Type && InquiryData.Peripheral_Type >= 0xa) {
return FALSE;
}
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c index 1359fe99bc..32474cb441 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -346,7 +346,7 @@ DxeIplAddEncapsulatedFirmwareVolumes ( PeiServicesFfsGetVolumeInfo (&VolumeHandle, &VolumeInfo);
PeiPiLibBuildPiFvInfoPpi (
- (EFI_PHYSICAL_ADDRESS) FvHeader,
+ (EFI_PHYSICAL_ADDRESS) (UINTN) FvHeader,
FvHeader->FvLength,
&(VolumeInfo.FvName),
&(((EFI_FFS_FILE_HEADER*)FileHandle)->Name)
diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c index 958263b522..34fe0a1d9e 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -142,8 +142,8 @@ PeiFileHandleToVolume ( PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ());
for (Index = 0; Index < PrivateData->FvCount; Index++) {
FwVolHeader = PrivateData->Fv[Index].FvHeader;
- if (((UINT64) FileHandle > (UINT64) FwVolHeader ) && \
- ((UINT64) FileHandle <= ((UINT64) FwVolHeader + FwVolHeader->FvLength - 1))) {
+ if (((UINT64) (UINTN) FileHandle > (UINT64) (UINTN) FwVolHeader ) && \
+ ((UINT64) (UINTN) FileHandle <= ((UINT64) (UINTN) FwVolHeader + FwVolHeader->FvLength - 1))) {
*VolumeHandle = (EFI_PEI_FV_HANDLE)FwVolHeader;
return TRUE;
}
diff --git a/MdeModulePkg/Library/DxeNetLib/NetDebug.c b/MdeModulePkg/Library/DxeNetLib/NetDebug.c index ffaac1dbf7..e182b741f5 100644 --- a/MdeModulePkg/Library/DxeNetLib/NetDebug.c +++ b/MdeModulePkg/Library/DxeNetLib/NetDebug.c @@ -54,7 +54,7 @@ UINT8 mSyslogDstMac [NET_ETHER_ADDR_LEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff} UINT32 mSyslogDstIp = 0xffffffff;
UINT32 mSyslogSrcIp = 0;
-UINT8 *
+CHAR8 *
MonthName[] = {
"Jan",
"Feb",
diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c index d9ee3229cd..69598f15c3 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c @@ -559,7 +559,7 @@ EfiDhcp4RenewRebind ( DhcpSb->Selected,
DhcpSb->Para,
DHCP_MSG_REQUEST,
- "Extra renew/rebind by the application"
+ (UINT8 *) "Extra renew/rebind by the application"
);
if (EFI_ERROR (Status)) {
diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c index 64e3bd8fd7..17c61007f1 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c @@ -756,14 +756,14 @@ DhcpHandleRequest ( Message = NULL;
if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {
- Message = "Lease confirmed isn't the same as that in the offer";
+ Message = (UINT8 *) "Lease confirmed isn't the same as that in the offer";
goto REJECT;
}
Status = DhcpCallUser (DhcpSb, Dhcp4RcvdAck, Packet, NULL);
if (EFI_ERROR (Status)) {
- Message = "Lease is denied upon received ACK";
+ Message = (UINT8 *) "Lease is denied upon received ACK";
goto REJECT;
}
@@ -773,7 +773,7 @@ DhcpHandleRequest ( Status = DhcpLeaseAcquired (DhcpSb);
if (EFI_ERROR (Status)) {
- Message = "Lease is denied upon entering bound";
+ Message = (UINT8 *) "Lease is denied upon entering bound";
goto REJECT;
}
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c index fdd50b3535..081db47d49 100644 --- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c +++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c @@ -225,8 +225,8 @@ Ip4ConfigDriverBindingStart ( Instance->Controller = ControllerHandle;
Instance->Image = This->DriverBindingHandle;
- Instance->Ip4ConfigProtocol = mIp4ConfigProtocolTemplate;
- Instance->NicIp4Protocol = mNicIp4ConfigProtocolTemplate;
+ CopyMem (&Instance->Ip4ConfigProtocol, &mIp4ConfigProtocolTemplate, sizeof (mIp4ConfigProtocolTemplate));
+ CopyMem (&Instance->NicIp4Protocol, &mNicIp4ConfigProtocolTemplate, sizeof (mNicIp4ConfigProtocolTemplate));
Instance->State = IP4_CONFIG_STATE_IDLE;
Instance->Mnp = Mnp;
diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c index c1529d2620..3d26ec2a4c 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c @@ -795,6 +795,8 @@ MnpEnqueuePacket ( MNP_GROUP_ADDRESS *GroupAddress;
MNP_RXDATA_WRAP *RxDataWrap;
+
+ GroupAddress = NULL;
//
// First, analyse the packet header.
//
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c index ca6d83f042..3ce8792537 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c @@ -61,7 +61,7 @@ EfiMtftp4GetModeData ( Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
CopyMem(&ModeData->ConfigData, &Instance->Config, sizeof (Instance->Config));
ModeData->SupportedOptionCount = MTFTP4_SUPPORTED_OPTIONS;
- ModeData->SupportedOptoins = mMtftp4SupportedOptions;
+ ModeData->SupportedOptoins = (UINT8 **) mMtftp4SupportedOptions;
ModeData->UnsupportedOptionCount = 0;
ModeData->UnsupportedOptoins = NULL;
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c index b85784a926..64932ae8a2 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c @@ -21,7 +21,7 @@ Abstract: #include "Mtftp4Impl.h"
-UINT8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS] = {
+CHAR8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS] = {
"blksize",
"timeout",
"tsize",
@@ -438,7 +438,7 @@ Mtftp4ParseOption ( return EFI_INVALID_PARAMETER;
}
- if (NetStringEqualNoCase (This->OptionStr, "blksize")) {
+ if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "blksize")) {
//
// block size option, valid value is between [8, 65464]
//
@@ -451,7 +451,7 @@ Mtftp4ParseOption ( MtftpOption->BlkSize = (UINT16) Value;
MtftpOption->Exist |= MTFTP4_BLKSIZE_EXIST;
- } else if (NetStringEqualNoCase (This->OptionStr, "timeout")) {
+ } else if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "timeout")) {
//
// timeout option, valid value is between [1, 255]
//
@@ -463,14 +463,14 @@ Mtftp4ParseOption ( MtftpOption->Timeout = (UINT8) Value;
- } else if (NetStringEqualNoCase (This->OptionStr, "tsize")) {
+ } else if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "tsize")) {
//
// tsize option, the biggest transfer supported is 4GB with block size option
//
MtftpOption->Tsize = NetStringToU32 (This->ValueStr);
MtftpOption->Exist |= MTFTP4_TSIZE_EXIST;
- } else if (NetStringEqualNoCase (This->OptionStr, "multicast")) {
+ } else if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "multicast")) {
//
// Multicast option, if it is a request, the value must be a zero
// length string, otherwise, it is formated like "204.0.0.1,1857,1\0"
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.h b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.h index 2595dc2795..22b7c7d923 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.h +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.h @@ -69,5 +69,5 @@ Mtftp4ParseOptionOack ( OUT MTFTP4_OPTION *Option
);
-extern UINT8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS];
+extern CHAR8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS];
#endif
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c index 665114c7f8..906cce8deb 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c @@ -172,7 +172,7 @@ Mtftp4RrqSaveBlock ( Mtftp4SendError (
Instance,
EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION,
- "User aborted download"
+ (UINT8 *) "User aborted download"
);
return EFI_ABORTED;
@@ -203,7 +203,7 @@ Mtftp4RrqSaveBlock ( Mtftp4SendError (
Instance,
EFI_MTFTP4_ERRORCODE_DISK_FULL,
- "User provided memory block is too small"
+ (UINT8 *) "User provided memory block is too small"
);
return EFI_BUFFER_TOO_SMALL;
@@ -480,7 +480,7 @@ Mtftp4RrqHandleOack ( Mtftp4SendError (
Instance,
EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION,
- "Mal-formated OACK packet"
+ (UINT8 *) "Mal-formated OACK packet"
);
}
@@ -501,7 +501,7 @@ Mtftp4RrqHandleOack ( Mtftp4SendError (
Instance,
EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION,
- "Illegal multicast setting"
+ (UINT8 *) "Illegal multicast setting"
);
return EFI_TFTP_ERROR;
@@ -529,7 +529,7 @@ Mtftp4RrqHandleOack ( Mtftp4SendError (
Instance,
EFI_MTFTP4_ERRORCODE_ACCESS_VIOLATION,
- "Failed to create socket to receive multicast packet"
+ (UINT8 *) "Failed to create socket to receive multicast packet"
);
return Status;
@@ -675,7 +675,7 @@ Mtftp4RrqInput ( Mtftp4SendError (
Instance,
EFI_MTFTP4_ERRORCODE_REQUEST_DENIED,
- "User aborted the transfer"
+ (UINT8 *) "User aborted the transfer"
);
}
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c index 28082db042..ce9db682d9 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c @@ -278,7 +278,7 @@ Mtftp4SendRequest ( Mode = Instance->Token->ModeStr;
if (Mode == NULL) {
- Mode = "octet";
+ Mode = (UINT8 *) "octet";
}
//
@@ -583,7 +583,7 @@ Mtftp4OnTimerTick ( Mtftp4SendError (
Instance,
EFI_MTFTP4_ERRORCODE_REQUEST_DENIED,
- "User aborted the transfer in time out"
+ (UINT8 *) "User aborted the transfer in time out"
);
Mtftp4CleanOperation (Instance, EFI_ABORTED);
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c index a3b308f266..e61b7b59f8 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c @@ -149,7 +149,7 @@ Mtftp4WrqSendBlock ( Mtftp4SendError (
Instance,
EFI_MTFTP4_ERRORCODE_REQUEST_DENIED,
- "User aborted the transfer"
+ (UINT8 *) "User aborted the transfer"
);
return EFI_ABORTED;
@@ -235,7 +235,7 @@ Mtftp4WrqHandleAck ( Mtftp4SendError (
Instance,
EFI_MTFTP4_ERRORCODE_REQUEST_DENIED,
- "Block number rolls back, not supported, try blksize option"
+ (UINT8 *) "Block number rolls back, not supported, try blksize option"
);
return EFI_TFTP_ERROR;
@@ -339,7 +339,7 @@ Mtftp4WrqHandleOack ( Mtftp4SendError (
Instance,
EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION,
- "Mal-formated OACK packet"
+ (UINT8 *) "Mal-formated OACK packet"
);
}
@@ -465,7 +465,7 @@ Mtftp4WrqInput ( Mtftp4SendError (
Instance,
EFI_MTFTP4_ERRORCODE_REQUEST_DENIED,
- "User aborted the transfer"
+ (UINT8 *) "User aborted the transfer"
);
}
diff --git a/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.c b/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.c index d14dbd9152..63d11d2fe1 100644 --- a/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.c +++ b/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.c @@ -1662,7 +1662,7 @@ IpFilter ( Enable = EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST;
for (Index = 0; Index < Filter->IpCnt; ++Index) {
- PxebcMode->IpFilter.IpList[Index] = Filter->IpList[Index];
+ CopyMem (&PxebcMode->IpFilter.IpList[Index], &Filter->IpList[Index], sizeof (EFI_IP_ADDRESS));
if (IS_MULTICAST (&Filter->IpList[Index])) {
EFI_IP_ADDRESS *TmpIp;
@@ -1674,7 +1674,7 @@ IpFilter ( //
if (!Index2)
{
- TmpIp = (EFI_IP_ADDRESS *) &AllSystemsGroup;
+ TmpIp = (EFI_IP_ADDRESS *) &AllSystemsGroup;
--Index;
} else {
TmpIp = (EFI_IP_ADDRESS *) &Filter->IpList[Index];
@@ -2009,8 +2009,8 @@ BcSetStationIP ( goto RELEASE_LOCK;
}
- PxebcMode->StationIp = *StationIpPtr;
- PxebcMode->SubnetMask = *SubnetMaskPtr;
+ CopyMem (&PxebcMode->StationIp, StationIpPtr, sizeof (EFI_IP_ADDRESS));
+ CopyMem (&PxebcMode->SubnetMask, SubnetMaskPtr, sizeof (EFI_IP_ADDRESS));
Private->GoodStationIp = TRUE;
RELEASE_LOCK:
diff --git a/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_mtftp.c b/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_mtftp.c index b065a53f3a..d9fa36896d 100644 --- a/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_mtftp.c +++ b/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_mtftp.c @@ -1101,8 +1101,8 @@ MtftpDownload ( Filter.Filters = EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST;
Filter.IpCnt = 2;
- Filter.IpList[0] = Private->EfiBc.Mode->StationIp;
- Filter.IpList[1] = MtftpInfoPtr->MCastIp;
+ CopyMem (&Filter.IpList[0], &Private->EfiBc.Mode->StationIp, sizeof (EFI_IP_ADDRESS));
+ CopyMem (&Filter.IpList[1], &MtftpInfoPtr->MCastIp, sizeof (EFI_IP_ADDRESS));
if ((Status = IpFilter (Private, &Filter)) != EFI_SUCCESS) {
return Status;
diff --git a/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_udp.c b/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_udp.c index fcb55acfa0..eb2951abd8 100644 --- a/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_udp.c +++ b/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_udp.c @@ -317,7 +317,7 @@ UdpRead ( if (DestIpPtr == NULL) {
DestIpPtr = &TmpDestIp;
- TmpDestIp = Private->EfiBc.Mode->StationIp;
+ CopyMem (&TmpDestIp, &Private->EfiBc.Mode->StationIp, sizeof (EFI_IP_ADDRESS));
}
#if SUPPORT_IPV6
@@ -384,7 +384,7 @@ UdpRead ( DEBUG (
(DEBUG_INFO,
"\nUdpRead() Hdrs.Udpv4PseudoHeader == %Xh",
- Hdrs.Udpv4PseudoHeader)
+ &Hdrs.Udpv4PseudoHeader)
);
DEBUG (
(DEBUG_INFO,
|