diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-27 03:33:51 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-08-27 03:33:51 +0000 |
commit | 84b5c78e89686879f799a4cd095eeef83ff7cf34 (patch) | |
tree | 3cc8d6eed389d20c3ef707958cd22216b71ebd82 /MdeModulePkg | |
parent | f490a61d79cdbb3325f2f273e588eae54168fc42 (diff) | |
download | edk2-84b5c78e89686879f799a4cd095eeef83ff7cf34.zip edk2-84b5c78e89686879f799a4cd095eeef83ff7cf34.tar.gz edk2-84b5c78e89686879f799a4cd095eeef83ff7cf34.tar.bz2 |
Make MdeModulePkg GCC clean.
It also pass ICC+IPF and MYTOOLS+EBC build.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3711 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
28 files changed, 54 insertions, 61 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c index aa16605..290cb38 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c @@ -368,7 +368,6 @@ EhcEnablePeriodSchd ( @return EFI_DEVICE_ERROR : Fail to disable periodic schedule
**/
-STATIC
EFI_STATUS
EhcDisablePeriodSchd (
IN USB2_HC_DEV *Ehc,
@@ -422,7 +421,6 @@ EhcEnableAsyncSchd ( @return Others : Failed to disable the asynchronous schedule
**/
-STATIC
EFI_STATUS
EhcDisableAsyncSchd (
IN USB2_HC_DEV *Ehc,
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c index 58bcb25..1110310 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c @@ -547,7 +547,7 @@ SCSIBusDriverBindingStop ( gBS->OpenProtocol (
Controller,
&gEfiExtScsiPassThruProtocolGuid,
- (VOID **) &(EFI_EXT_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,
+ &ScsiPassThru,
This->DriverBindingHandle,
ChildHandleBuffer[Index],
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
@@ -556,7 +556,7 @@ SCSIBusDriverBindingStop ( gBS->OpenProtocol (
Controller,
&gEfiScsiPassThruProtocolGuid,
- (VOID **) &(EFI_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,
+ &ScsiPassThru,
This->DriverBindingHandle,
ChildHandleBuffer[Index],
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h index f24afd3..be13755 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h @@ -70,7 +70,7 @@ typedef struct { //
#define EFI_SCSI_BUS_PROTOCOL_GUID \
{ \
- 0x5261213D, 0x3A3D, 0x441E, 0xB3, 0xAF, 0x21, 0xD3, 0xF7, 0xA4, 0xCA, 0x17 \
+ 0x5261213D, 0x3A3D, 0x441E, {0xB3, 0xAF, 0x21, 0xD3, 0xF7, 0xA4, 0xCA, 0x17} \
}
typedef struct _EFI_SCSI_BUS_PROTOCOL {
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c index 8d747d0..795f545 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c @@ -284,7 +284,6 @@ UsbHubCtrlGetPortStatus ( @retval Others Failed to reset the port
**/
-STATIC
EFI_STATUS
UsbHubCtrlResetTT (
IN USB_DEVICE *HubDev,
@@ -319,7 +318,6 @@ UsbHubCtrlResetTT ( @retval Others Failed to set the feature
**/
-STATIC
EFI_STATUS
UsbHubCtrlSetHubFeature (
IN USB_DEVICE *HubDev,
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h index 09ae445..5fd8e76 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h @@ -84,7 +84,7 @@ enum { #define USB_BIT_IS_SET(Data, Bit) ((BOOLEAN)(((Data) & (Bit)) == (Bit)))
#define EFI_USB_BUS_PROTOCOL_GUID \
- {0x2B2F68CC, 0x0CD2, 0x44cf, 0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75}
+ {0x2B2F68CC, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75}}
#define USB_INTERFACE_FROM_USBIO(a) \
CR(a, USB_INTERFACE, UsbIo, USB_INTERFACE_SIGNATURE)
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c index a4a19e4..f551c0a 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c @@ -98,7 +98,7 @@ USBKeyboardCheckForKey ( );
EFI_GUID gEfiUsbKeyboardDriverGuid = {
- 0xa05f5f78, 0xfb3, 0x4d10, 0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c
+ 0xa05f5f78, 0xfb3, 0x4d10, {0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c}
};
//
@@ -330,7 +330,7 @@ USBKeyboardDriverBindingStart ( //
// We only care interrupt endpoint here
//
- UsbKeyboardDevice->IntEndpointDescriptor = EndpointDescriptor;
+ CopyMem(&UsbKeyboardDevice->IntEndpointDescriptor, &EndpointDescriptor, sizeof(EndpointDescriptor));
Found = TRUE;
}
}
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c index 939ba39..6c92da9 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c @@ -108,14 +108,14 @@ UsbBotInit ( (UsbBot->BulkInEndpoint == NULL)) {
UsbBot->BulkInEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1);
- *UsbBot->BulkInEndpoint = EndPoint;
+ CopyMem(UsbBot->BulkInEndpoint, &EndPoint, sizeof (EndPoint));
}
if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&
(UsbBot->BulkOutEndpoint == NULL)) {
UsbBot->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1) + 1;
- *UsbBot->BulkOutEndpoint = EndPoint;
+ CopyMem(UsbBot->BulkOutEndpoint, &EndPoint, sizeof(EndPoint));
}
}
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c index 1028e20..5c07c54 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c @@ -111,14 +111,14 @@ UsbCbiInit ( (UsbCbi->BulkInEndpoint == NULL)) {
UsbCbi->BulkInEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1);
- *UsbCbi->BulkInEndpoint = EndPoint;
+ CopyMem(UsbCbi->BulkInEndpoint, &EndPoint, sizeof (EndPoint));;
}
if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&
(UsbCbi->BulkOutEndpoint == NULL)) {
UsbCbi->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 1;
- *UsbCbi->BulkOutEndpoint = EndPoint;
+ CopyMem(UsbCbi->BulkOutEndpoint, &EndPoint, sizeof (EndPoint));
}
} else if (USB_IS_INTERRUPT_ENDPOINT (EndPoint.Attributes)) {
@@ -129,7 +129,7 @@ UsbCbiInit ( (UsbCbi->InterruptEndpoint == NULL)) {
UsbCbi->InterruptEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 2;
- *UsbCbi->InterruptEndpoint = EndPoint;
+ CopyMem(UsbCbi->InterruptEndpoint, &EndPoint, sizeof (EndPoint));
}
}
}
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/usbmouse.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/usbmouse.c index 01c37c1..446e8eb 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/usbmouse.c +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/usbmouse.c @@ -77,7 +77,7 @@ USBMouseDriverBindingStop ( );
EFI_GUID gEfiUsbMouseDriverGuid = {
- 0x290156b5, 0x6a05, 0x4ac0, 0xb8, 0x0, 0x51, 0x27, 0x55, 0xad, 0x14, 0x29
+ 0x290156b5, 0x6a05, 0x4ac0, {0xb8, 0x0, 0x51, 0x27, 0x55, 0xad, 0x14, 0x29}
};
EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {
diff --git a/MdeModulePkg/Include/Library/NetLib.h b/MdeModulePkg/Include/Library/NetLib.h index fe24044..8787f6c 100644 --- a/MdeModulePkg/Include/Library/NetLib.h +++ b/MdeModulePkg/Include/Library/NetLib.h @@ -188,7 +188,7 @@ typedef struct { //
#define EFI_IP4(EfiIpAddr) (*(IP4_ADDR *) ((EfiIpAddr).Addr))
#define EFI_NTOHL(EfiIp) (NTOHL (EFI_IP4 ((EfiIp))))
-#define EFI_IP4_EQUAL(Ip1, Ip2) (NetCompareMem (&(Ip1), &(Ip2), sizeof (EFI_IPv4_ADDRESS)) == 0)
+#define EFI_IP4_EQUAL(Ip1, Ip2) (NetCompareMem ((Ip1), (Ip2), sizeof (EFI_IPv4_ADDRESS)) == 0)
INTN
NetGetMaskLength (
@@ -249,7 +249,7 @@ extern EFI_IPv4_ADDRESS mZeroIp4Addr; #define NET_MIN(a, b) ((a) < (b) ? (a) : (b)) #define NET_MAX(a, b) ((a) > (b) ? (a) : (b)) -#define NET_RANDOM(Seed) (((Seed) * 1103515245L + 12345) % 4294967295L) +#define NET_RANDOM(Seed) ((UINT32) ((UINT32) (Seed) * 1103515245UL + 12345) % 4294967295UL) UINT32 diff --git a/MdeModulePkg/Include/Library/UdpIoLib.h b/MdeModulePkg/Include/Library/UdpIoLib.h index 3f49cc9..c6059f1 100644 --- a/MdeModulePkg/Include/Library/UdpIoLib.h +++ b/MdeModulePkg/Include/Library/UdpIoLib.h @@ -99,7 +99,7 @@ typedef struct { EFI_UDP4_TRANSMIT_DATA UdpTxData; } UDP_TX_TOKEN; -typedef struct _UDP_IO_PORT { +struct _UDP_IO_PORT { UINT32 Signature; NET_LIST_ENTRY Link; INTN RefCnt; diff --git a/MdeModulePkg/Include/Protocol/NicIp4Config.h b/MdeModulePkg/Include/Protocol/NicIp4Config.h index cf8cf27..da38888 100644 --- a/MdeModulePkg/Include/Protocol/NicIp4Config.h +++ b/MdeModulePkg/Include/Protocol/NicIp4Config.h @@ -38,7 +38,7 @@ Abstract: typedef struct _EFI_NIC_IP4_CONFIG_PROTOCOL EFI_NIC_IP4_CONFIG_PROTOCOL;
-typedef enum {
+enum {
//
// Config source: dhcp or static
//
@@ -111,7 +111,6 @@ EFI_STATUS IN NIC_ADDR *NicAddr OPTIONAL
);
-typedef
struct _EFI_NIC_IP4_CONFIG_PROTOCOL {
EFI_NIC_IP4_CONFIG_GET_NAME GetName;
EFI_NIC_IP4_CONFIG_GET_INFO GetInfo;
diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c index 4b8a699..98df75d 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c @@ -47,8 +47,8 @@ EFI_IP4_CONFIG_DATA mIpIoDefaultIpConfigData = { FALSE,
FALSE,
FALSE,
- {0, 0, 0, 0},
- {0, 0, 0, 0},
+ {{0, 0, 0, 0}},
+ {{0, 0, 0, 0}},
0,
255,
FALSE,
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c index 9057a03..0dff772 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c @@ -77,7 +77,7 @@ IP4_ADDR mIp4AllMasks[IP4_MASK_NUM] = { 0xFFFFFFFF, }; -EFI_IPv4_ADDRESS mZeroIp4Addr = {0, 0, 0, 0}; +EFI_IPv4_ADDRESS mZeroIp4Addr = {{0, 0, 0, 0}}; /**
Converts the low nibble of a byte to hex unicode character.
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c index 812756d..d1f89bc 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c @@ -88,7 +88,7 @@ TERMINAL_DEV gTerminalDevTemplate = { {
0,
0,
- { 0 }
+ { {0} }
},
NULL, // ControllerNameTable
NULL,
diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c index 4155439..64e3bd8 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c @@ -755,7 +755,7 @@ DhcpHandleRequest ( //
Message = NULL;
- if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {
+ if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {
Message = "Lease confirmed isn't the same as that in the offer";
goto REJECT;
}
@@ -846,7 +846,7 @@ DhcpHandleRenewRebind ( // The lease is different from the selected. Don't send a DECLINE
// since it isn't existed in the client's FSM.
//
- if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {
+ if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {
goto ON_EXIT;
}
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c index ee78cee..31d9e8b 100644 --- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c +++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c @@ -655,7 +655,7 @@ Ip4ConfigOnDhcp4Complete ( //
// Create a route if there is a default router.
//
- if (!EFI_IP4_EQUAL (Dhcp4Mode.RouterAddress, mZeroIp4Addr)) {
+ if (!EFI_IP4_EQUAL (&Dhcp4Mode.RouterAddress, &mZeroIp4Addr)) {
Ip4Config->RouteTableSize = 2;
NetZeroMem (&Ip4Config->RouteTable[1].SubnetAddress, sizeof (EFI_IPv4_ADDRESS));
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c index e617d3d..40c5daa 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -860,8 +860,8 @@ EfiIp4Configure ( }
if (!Current->UseDefaultAddress &&
- (!EFI_IP4_EQUAL (Current->StationAddress, IpConfigData->StationAddress) ||
- !EFI_IP4_EQUAL (Current->SubnetMask, IpConfigData->SubnetMask))) {
+ (!EFI_IP4_EQUAL (&Current->StationAddress, &IpConfigData->StationAddress) ||
+ !EFI_IP4_EQUAL (&Current->SubnetMask, &IpConfigData->SubnetMask))) {
Status = EFI_ALREADY_STARTED;
goto ON_EXIT;
}
@@ -978,7 +978,7 @@ Ip4Groups ( for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {
Group = IpInstance->Groups[Index - 1];
- if ((GroupAddress == NULL) || EFI_IP4_EQUAL (Group, *GroupAddress)) {
+ if ((GroupAddress == NULL) || EFI_IP4_EQUAL (&Group, GroupAddress)) {
if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) {
return EFI_DEVICE_ERROR;
}
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c index 0232bfe..8aec74d 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c @@ -306,7 +306,7 @@ Ip4Output ( // them. Tag each fragment other than the first one as spawn from it.
//
Mtu = IpSb->SnpMode.MaxPacketSize;
- HeadLen = sizeof (IP4_HEAD) + (OptLen + 3) &~0x03;
+ HeadLen = sizeof (IP4_HEAD) + ((OptLen + 3) & (~0x03));
Head->Id = mIp4Id++;
if (Packet->TotalSize + HeadLen > Mtu) {
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c index 2d3c4f5..ca6d83f 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c @@ -59,7 +59,7 @@ EfiMtftp4GetModeData ( OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);
Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
- ModeData->ConfigData = Instance->Config;
+ CopyMem(&ModeData->ConfigData, &Instance->Config, sizeof (Instance->Config));
ModeData->SupportedOptionCount = MTFTP4_SUPPORTED_OPTIONS;
ModeData->SupportedOptoins = mMtftp4SupportedOptions;
ModeData->UnsupportedOptionCount = 0;
@@ -228,7 +228,7 @@ EfiMtftp4Configure ( return EFI_ACCESS_DENIED;
}
- Instance->Config = *ConfigData;
+ CopyMem(&Instance->Config, ConfigData, sizeof (*ConfigData));;
Instance->State = MTFTP4_STATE_CONFIGED;
NET_RESTORE_TPL (OldTpl);
diff --git a/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.c b/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.c index a520349..4b66ac0 100644 --- a/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.c +++ b/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.c @@ -1146,9 +1146,6 @@ PxebcBisDetect ( return TRUE;
}
-static VOID *BCNotifyReg;
-
-
/**
Start and initialize the BaseCode protocol, Simple Network protocol and UNDI.
@@ -1559,7 +1556,7 @@ BcStop ( return StatCode;
}
-const IPV4_ADDR AllSystemsGroup = { 224, 0, 0, 1 };
+const IPV4_ADDR AllSystemsGroup = {{224, 0, 0, 1}};
/**
diff --git a/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.h b/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.h index 71d1518..f4a19ba 100644 --- a/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.h +++ b/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.h @@ -51,7 +51,7 @@ Abstract: #define SUPPORT_IPV6 0 -#define PXE_BASECODE_DEVICE_SIGNATURE 'pxed' +#define PXE_BASECODE_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('p', 'x', 'e', 'd') // // Determine the classes of IPv4 address @@ -166,7 +166,7 @@ typedef struct { // // // -#define LOADFILE_DEVICE_SIGNATURE 'pxel' +#define LOADFILE_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('p', 'x', 'e', 'l') typedef struct { UINTN Signature; diff --git a/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_dhcp.c b/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_dhcp.c index d0eb98c..3e04c0d 100644 --- a/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_dhcp.c +++ b/MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_dhcp.c @@ -26,8 +26,8 @@ STATIC EFI_PXE_BASE_CODE_UDP_PORT DhcpServerPort = DHCP_SERVER_PORT; STATIC EFI_PXE_BASE_CODE_UDP_PORT DHCPClientPort = DHCP_CLIENT_PORT;
STATIC EFI_PXE_BASE_CODE_UDP_PORT PseudoDhcpServerPort = PXE_DISCOVERY_PORT;
#define PSEUDO_DHCP_CLIENT_PORT PseudoDhcpServerPort
-STATIC EFI_IP_ADDRESS BroadcastIP = { 0xffffffff };
-STATIC EFI_IP_ADDRESS DefaultSubnetMask = { 0xffffff00 };
+STATIC EFI_IP_ADDRESS BroadcastIP = {{0xffffffff}};
+STATIC EFI_IP_ADDRESS DefaultSubnetMask = {{0xffffff00}};
typedef union {
DHCPV4_OP_STRUCT *OpPtr;
@@ -1470,7 +1470,7 @@ Release ( CopyMem (
&DHCPRELEASEoptions.DhcServerIpPtr,
- &(DHCPV4_OP_SERVER_IP *) DHCPV4_ACK_BUFFER.OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1],
+ (DHCPV4_OP_SERVER_IP *) DHCPV4_ACK_BUFFER.OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1],
sizeof DHCPRELEASEoptions.DhcServerIpPtr
);
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c index 2278e84..c714dd3 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c @@ -681,6 +681,8 @@ Tcp4Dispatcher ( return Tcp4Route (Tcb, (TCP4_ROUTE_INFO *) Data);
+ default:
+ return EFI_UNSUPPORTED;
}
return EFI_SUCCESS;
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c index 1cc8488..fdd64ef 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c @@ -35,7 +35,7 @@ NET_LIST_ENTRY mTcpListenQue = { TCP_SEQNO mTcpGlobalIss = 0x4d7e980b;
-STATIC CHAR16 *mTcpStateName[] = {
+CHAR16 *mTcpStateName[] = {
L"TCP_CLOSED",
L"TCP_LISTEN",
L"TCP_SYN_SENT",
@@ -267,7 +267,7 @@ TcpFindTcbByPeer ( NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
- if (EFI_IP4_EQUAL (*Addr, Tcb->LocalEnd.Ip) &&
+ if (EFI_IP4_EQUAL (Addr, &Tcb->LocalEnd.Ip) &&
(LocalPort == Tcb->LocalEnd.Port)) {
return TRUE;
@@ -277,7 +277,7 @@ TcpFindTcbByPeer ( NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);
- if (EFI_IP4_EQUAL (*Addr, Tcb->LocalEnd.Ip) &&
+ if (EFI_IP4_EQUAL (Addr, &Tcb->LocalEnd.Ip) &&
(LocalPort == Tcb->LocalEnd.Port)) {
return TRUE;
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c index b81f442..7326067 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c @@ -33,7 +33,6 @@ TcpGetUint16 ( return NTOHS (Value);
}
-STATIC
VOID
TcpPutUint16 (
IN UINT8 *Buf,
diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c index fac6d33..5cf87c7 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c @@ -424,7 +424,7 @@ Udp4FindInstanceByPort ( continue;
}
- if (EFI_IP4_EQUAL (ConfigData->StationAddress, *Address) &&
+ if (EFI_IP4_EQUAL (&ConfigData->StationAddress, Address) &&
(ConfigData->StationPort == Port)) {
//
// if both the address and the port are the same, return TRUE.
@@ -566,8 +566,8 @@ Udp4IsReconfigurable ( }
if (!NewConfigData->UseDefaultAddress &&
- (!EFI_IP4_EQUAL (NewConfigData->StationAddress, OldConfigData->StationAddress) ||
- !EFI_IP4_EQUAL (NewConfigData->SubnetMask, OldConfigData->SubnetMask))) {
+ (!EFI_IP4_EQUAL (&NewConfigData->StationAddress, &OldConfigData->StationAddress) ||
+ !EFI_IP4_EQUAL (&NewConfigData->SubnetMask, &OldConfigData->SubnetMask))) {
//
// If the instance doesn't use the default address, and the new address or
// new subnet mask is different from the old values.
@@ -576,14 +576,14 @@ Udp4IsReconfigurable ( }
}
- if (!EFI_IP4_EQUAL (NewConfigData->RemoteAddress, OldConfigData->RemoteAddress)) {
+ if (!EFI_IP4_EQUAL (&NewConfigData->RemoteAddress, &OldConfigData->RemoteAddress)) {
//
// The remoteaddress is not the same.
//
return FALSE;
}
- if (!EFI_IP4_EQUAL (NewConfigData->RemoteAddress, mZeroIp4Addr) && (NewConfigData->RemotePort != OldConfigData->RemotePort)) {
+ if (!EFI_IP4_EQUAL (&NewConfigData->RemoteAddress, &mZeroIp4Addr) && (NewConfigData->RemotePort != OldConfigData->RemotePort)) {
//
// The RemotePort differs if it's designated in the configdata.
//
@@ -733,13 +733,13 @@ Udp4ValidateTxToken ( return EFI_INVALID_PARAMETER;
}
- if (EFI_IP4_EQUAL (UdpSessionData->DestinationAddress, mZeroIp4Addr)) {
+ if (EFI_IP4_EQUAL (&UdpSessionData->DestinationAddress, &mZeroIp4Addr)) {
//
// The DestinationAddress specified in the UdpSessionData is 0.
//
return EFI_INVALID_PARAMETER;
}
- } else if (EFI_IP4_EQUAL (ConfigData->RemoteAddress, mZeroIp4Addr)) {
+ } else if (EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &mZeroIp4Addr)) {
//
// the configured RemoteAddress is all zero, and the user doens't override the
// destination address.
@@ -962,7 +962,7 @@ Udp4LeaveGroup ( McastIp = Arg;
- if ((McastIp != NULL) && (!EFI_IP4_EQUAL (*McastIp, (UINTN) Item->Key))) {
+ if ((McastIp != NULL) && (!EFI_IP4_EQUAL (McastIp, &(Item->Key)))) {
//
// McastIp is not NULL and the multicast address contained in the Item
// is not the same as McastIp.
@@ -1172,16 +1172,16 @@ Udp4MatchDgram ( return FALSE;
}
- if (!EFI_IP4_EQUAL (ConfigData->RemoteAddress, mZeroIp4Addr) &&
- !EFI_IP4_EQUAL (ConfigData->RemoteAddress, Udp4Session->SourceAddress)) {
+ if (!EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &mZeroIp4Addr) &&
+ !EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &Udp4Session->SourceAddress)) {
//
// This datagram doesn't come from the instance's specified sender.
//
return FALSE;
}
- if (EFI_IP4_EQUAL (ConfigData->StationAddress, mZeroIp4Addr) ||
- EFI_IP4_EQUAL (Udp4Session->DestinationAddress, ConfigData->StationAddress)) {
+ if (EFI_IP4_EQUAL (&ConfigData->StationAddress, &mZeroIp4Addr) ||
+ EFI_IP4_EQUAL (&Udp4Session->DestinationAddress, &ConfigData->StationAddress)) {
//
// The instance is configured to receive datagrams destinated to any station IP or
// the destination address of this datagram matches the configured station IP.
@@ -1702,7 +1702,7 @@ Udp4IcmpHandler ( if (!Instance->Configured ||
Instance->ConfigData.AcceptPromiscuous ||
Instance->ConfigData.AcceptAnyPort ||
- EFI_IP4_EQUAL (Instance->ConfigData.StationAddress, mZeroIp4Addr)) {
+ EFI_IP4_EQUAL (&Instance->ConfigData.StationAddress, &mZeroIp4Addr)) {
//
// Don't try to deliver the ICMP error to this instance if it is not configured,
// or it's configured to be promiscuous or accept any port or accept all the
diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c index adfd011..abb2e6f 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c @@ -604,7 +604,7 @@ Udp4Transmit ( // Set the SourceAddress, SrcPort and Destination according to the specified
// UdpSessionData.
//
- if (!EFI_IP4_EQUAL (UdpSessionData->SourceAddress, mZeroIp4Addr)) {
+ if (!EFI_IP4_EQUAL (&UdpSessionData->SourceAddress, &mZeroIp4Addr)) {
NetCopyMem (&Override.SourceAddress, &UdpSessionData->SourceAddress, sizeof (EFI_IPv4_ADDRESS));
}
|