]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Make MdeModulePkg GCC clean.
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 27 Aug 2007 03:33:51 +0000 (03:33 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 27 Aug 2007 03:33:51 +0000 (03:33 +0000)
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

28 files changed:
MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.c
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h
MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c
MdeModulePkg/Bus/Usb/UsbMouseDxe/usbmouse.c
MdeModulePkg/Include/Library/NetLib.h
MdeModulePkg/Include/Library/UdpIoLib.h
MdeModulePkg/Include/Protocol/NicIp4Config.h
MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c
MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c
MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
MdeModulePkg/Universal/Network/PxeBcDxe/Bc.c
MdeModulePkg/Universal/Network/PxeBcDxe/Bc.h
MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_bc_dhcp.c
MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c
MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c
MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c

index aa166055569fe4fad33c5a8b0190362d7e1c3ba5..290cb3847a5d7825bb3a9f295260b187922adf0a 100644 (file)
@@ -368,7 +368,6 @@ EhcEnablePeriodSchd (
   @return EFI_DEVICE_ERROR : Fail to disable periodic schedule\r
 \r
 **/\r
   @return EFI_DEVICE_ERROR : Fail to disable periodic schedule\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 EhcDisablePeriodSchd (\r
   IN USB2_HC_DEV          *Ehc,\r
 EFI_STATUS\r
 EhcDisablePeriodSchd (\r
   IN USB2_HC_DEV          *Ehc,\r
@@ -422,7 +421,6 @@ EhcEnableAsyncSchd (
   @return Others      : Failed to disable the asynchronous schedule\r
 \r
 **/\r
   @return Others      : Failed to disable the asynchronous schedule\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 EhcDisableAsyncSchd (\r
   IN USB2_HC_DEV          *Ehc,\r
 EFI_STATUS\r
 EhcDisableAsyncSchd (\r
   IN USB2_HC_DEV          *Ehc,\r
index 58bcb25440680aca8406a578fbe7102e0d6371ac..1110310f92e8bfa9a32c0c935c77848bf8e678b6 100644 (file)
@@ -547,7 +547,7 @@ SCSIBusDriverBindingStop (
         gBS->OpenProtocol (\r
                Controller,\r
                &gEfiExtScsiPassThruProtocolGuid,\r
         gBS->OpenProtocol (\r
                Controller,\r
                &gEfiExtScsiPassThruProtocolGuid,\r
-               (VOID **) &(EFI_EXT_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,\r
+               &ScsiPassThru,\r
                This->DriverBindingHandle,\r
                ChildHandleBuffer[Index],\r
                EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
                This->DriverBindingHandle,\r
                ChildHandleBuffer[Index],\r
                EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
@@ -556,7 +556,7 @@ SCSIBusDriverBindingStop (
         gBS->OpenProtocol (\r
                Controller,\r
                &gEfiScsiPassThruProtocolGuid,\r
         gBS->OpenProtocol (\r
                Controller,\r
                &gEfiScsiPassThruProtocolGuid,\r
-               (VOID **) &(EFI_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,\r
+               &ScsiPassThru,\r
                This->DriverBindingHandle,\r
                ChildHandleBuffer[Index],\r
                EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
                This->DriverBindingHandle,\r
                ChildHandleBuffer[Index],\r
                EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
index f24afd3d101f6aaa51bc1839006e64b51a51b13a..be13755707fcc135b502af6ddb55b323750f8c35 100644 (file)
@@ -70,7 +70,7 @@ typedef struct {
 //\r
 #define EFI_SCSI_BUS_PROTOCOL_GUID \\r
   { \\r
 //\r
 #define EFI_SCSI_BUS_PROTOCOL_GUID \\r
   { \\r
-    0x5261213D, 0x3A3D, 0x441E, 0xB3, 0xAF, 0x21, 0xD3, 0xF7, 0xA4, 0xCA, 0x17 \\r
+    0x5261213D, 0x3A3D, 0x441E, {0xB3, 0xAF, 0x21, 0xD3, 0xF7, 0xA4, 0xCA, 0x17} \\r
   }\r
 \r
 typedef struct _EFI_SCSI_BUS_PROTOCOL {\r
   }\r
 \r
 typedef struct _EFI_SCSI_BUS_PROTOCOL {\r
index 8d747d06482e2be3f8a2b54b75cad7aea68ac504..795f545b7712eb59865756eeb6b45abbdd2195d5 100644 (file)
@@ -284,7 +284,6 @@ UsbHubCtrlGetPortStatus (
   @retval Others                Failed to reset the port\r
 \r
 **/\r
   @retval Others                Failed to reset the port\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 UsbHubCtrlResetTT (\r
   IN  USB_DEVICE          *HubDev,\r
 EFI_STATUS\r
 UsbHubCtrlResetTT (\r
   IN  USB_DEVICE          *HubDev,\r
@@ -319,7 +318,6 @@ UsbHubCtrlResetTT (
   @retval Others                Failed to set the feature\r
 \r
 **/\r
   @retval Others                Failed to set the feature\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 UsbHubCtrlSetHubFeature (\r
   IN  USB_DEVICE          *HubDev,\r
 EFI_STATUS\r
 UsbHubCtrlSetHubFeature (\r
   IN  USB_DEVICE          *HubDev,\r
index 09ae44533e15f5ca69343c8a6c5312e8f3677457..5fd8e763e393ed775e9042afed43117a87061eec 100644 (file)
@@ -84,7 +84,7 @@ enum {
 #define USB_BIT_IS_SET(Data, Bit)   ((BOOLEAN)(((Data) & (Bit)) == (Bit)))\r
 \r
 #define EFI_USB_BUS_PROTOCOL_GUID \\r
 #define USB_BIT_IS_SET(Data, Bit)   ((BOOLEAN)(((Data) & (Bit)) == (Bit)))\r
 \r
 #define EFI_USB_BUS_PROTOCOL_GUID \\r
-          {0x2B2F68CC, 0x0CD2, 0x44cf, 0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75}\r
+          {0x2B2F68CC, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75}}\r
 \r
 #define USB_INTERFACE_FROM_USBIO(a) \\r
           CR(a, USB_INTERFACE, UsbIo, USB_INTERFACE_SIGNATURE)\r
 \r
 #define USB_INTERFACE_FROM_USBIO(a) \\r
           CR(a, USB_INTERFACE, UsbIo, USB_INTERFACE_SIGNATURE)\r
index a4a19e4b9c040643366bd965c303794275150380..f551c0a93bf5e7b794e3588475b96a84f5ca34ff 100644 (file)
@@ -98,7 +98,7 @@ USBKeyboardCheckForKey (
   );\r
 \r
 EFI_GUID  gEfiUsbKeyboardDriverGuid = {\r
   );\r
 \r
 EFI_GUID  gEfiUsbKeyboardDriverGuid = {\r
-  0xa05f5f78, 0xfb3, 0x4d10, 0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c\r
+  0xa05f5f78, 0xfb3, 0x4d10, {0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c}\r
 };\r
 \r
 //\r
 };\r
 \r
 //\r
@@ -330,7 +330,7 @@ USBKeyboardDriverBindingStart (
       //\r
       // We only care interrupt endpoint here\r
       //\r
       //\r
       // We only care interrupt endpoint here\r
       //\r
-      UsbKeyboardDevice->IntEndpointDescriptor  = EndpointDescriptor;\r
+      CopyMem(&UsbKeyboardDevice->IntEndpointDescriptor, &EndpointDescriptor, sizeof(EndpointDescriptor));\r
       Found = TRUE;\r
     }\r
   }\r
       Found = TRUE;\r
     }\r
   }\r
index 939ba394cfbe013993cc05e661dae5ba09c63192..6c92da9c717d54fda7f4f2362f608c42cffc234b 100644 (file)
@@ -108,14 +108,14 @@ UsbBotInit (
        (UsbBot->BulkInEndpoint == NULL)) {\r
 \r
       UsbBot->BulkInEndpoint  = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1);\r
        (UsbBot->BulkInEndpoint == NULL)) {\r
 \r
       UsbBot->BulkInEndpoint  = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1);\r
-      *UsbBot->BulkInEndpoint = EndPoint;\r
+      CopyMem(UsbBot->BulkInEndpoint, &EndPoint, sizeof (EndPoint));\r
     }\r
 \r
     if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&\r
        (UsbBot->BulkOutEndpoint == NULL)) {\r
 \r
       UsbBot->BulkOutEndpoint   = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1) + 1;\r
     }\r
 \r
     if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&\r
        (UsbBot->BulkOutEndpoint == NULL)) {\r
 \r
       UsbBot->BulkOutEndpoint   = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1) + 1;\r
-      *UsbBot->BulkOutEndpoint  = EndPoint;\r
+      CopyMem(UsbBot->BulkOutEndpoint, &EndPoint, sizeof(EndPoint));\r
     }\r
   }\r
 \r
     }\r
   }\r
 \r
index 1028e201c2b3cd17847459c21998f1c133d4b815..5c07c548b9081631b3946a30cc10c3a475f3a3d8 100644 (file)
@@ -111,14 +111,14 @@ UsbCbiInit (
          (UsbCbi->BulkInEndpoint == NULL)) {\r
 \r
         UsbCbi->BulkInEndpoint  = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1);\r
          (UsbCbi->BulkInEndpoint == NULL)) {\r
 \r
         UsbCbi->BulkInEndpoint  = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1);\r
-        *UsbCbi->BulkInEndpoint = EndPoint;\r
+        CopyMem(UsbCbi->BulkInEndpoint, &EndPoint, sizeof (EndPoint));;\r
       }\r
 \r
       if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&\r
          (UsbCbi->BulkOutEndpoint == NULL)) {\r
 \r
         UsbCbi->BulkOutEndpoint   = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 1;\r
       }\r
 \r
       if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&\r
          (UsbCbi->BulkOutEndpoint == NULL)) {\r
 \r
         UsbCbi->BulkOutEndpoint   = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 1;\r
-        *UsbCbi->BulkOutEndpoint  = EndPoint;\r
+        CopyMem(UsbCbi->BulkOutEndpoint, &EndPoint, sizeof (EndPoint));\r
       }\r
 \r
     } else if (USB_IS_INTERRUPT_ENDPOINT (EndPoint.Attributes)) {\r
       }\r
 \r
     } else if (USB_IS_INTERRUPT_ENDPOINT (EndPoint.Attributes)) {\r
@@ -129,7 +129,7 @@ UsbCbiInit (
           (UsbCbi->InterruptEndpoint == NULL)) {\r
 \r
         UsbCbi->InterruptEndpoint   = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 2;\r
           (UsbCbi->InterruptEndpoint == NULL)) {\r
 \r
         UsbCbi->InterruptEndpoint   = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 2;\r
-        *UsbCbi->InterruptEndpoint  = EndPoint;\r
+        CopyMem(UsbCbi->InterruptEndpoint, &EndPoint, sizeof (EndPoint));\r
       }\r
     }\r
   }\r
       }\r
     }\r
   }\r
index 01c37c19a6703538d9dc9e4f1281ad7ed6cf608b..446e8eb443166f417914a78f9841f00c110801bb 100644 (file)
@@ -77,7 +77,7 @@ USBMouseDriverBindingStop (
   );\r
 \r
 EFI_GUID  gEfiUsbMouseDriverGuid = {\r
   );\r
 \r
 EFI_GUID  gEfiUsbMouseDriverGuid = {\r
-  0x290156b5, 0x6a05, 0x4ac0, 0xb8, 0x0, 0x51, 0x27, 0x55, 0xad, 0x14, 0x29\r
+  0x290156b5, 0x6a05, 0x4ac0, {0xb8, 0x0, 0x51, 0x27, 0x55, 0xad, 0x14, 0x29}\r
 };\r
 \r
 EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {\r
 };\r
 \r
 EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {\r
index fe240442ae812410e1c38948e329ad11f1acb8c4..8787f6cf7addedfea8b99b26f517df7ae18359d0 100644 (file)
@@ -188,7 +188,7 @@ typedef struct {
 //\r
 #define EFI_IP4(EfiIpAddr)       (*(IP4_ADDR *) ((EfiIpAddr).Addr))\r
 #define EFI_NTOHL(EfiIp)         (NTOHL (EFI_IP4 ((EfiIp))))\r
 //\r
 #define EFI_IP4(EfiIpAddr)       (*(IP4_ADDR *) ((EfiIpAddr).Addr))\r
 #define EFI_NTOHL(EfiIp)         (NTOHL (EFI_IP4 ((EfiIp))))\r
-#define EFI_IP4_EQUAL(Ip1, Ip2)  (NetCompareMem (&(Ip1), &(Ip2), sizeof (EFI_IPv4_ADDRESS)) == 0)\r
+#define EFI_IP4_EQUAL(Ip1, Ip2)  (NetCompareMem ((Ip1), (Ip2), sizeof (EFI_IPv4_ADDRESS)) == 0)\r
 \r
 INTN\r
 NetGetMaskLength (\r
 \r
 INTN\r
 NetGetMaskLength (\r
@@ -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_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
 
 
 UINT32
index 3f49cc9209de194df6dece4bc4726c65057d125d..c6059f18e350ce5e2b9dda4bd6b7a76724451da9 100644 (file)
@@ -99,7 +99,7 @@ typedef struct {
   EFI_UDP4_TRANSMIT_DATA    UdpTxData;
 } UDP_TX_TOKEN;
 
   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;
   UINT32                    Signature;
   NET_LIST_ENTRY            Link;
   INTN                      RefCnt;
index cf8cf27dc08d367af9d0d2f87e96f982a1181fc3..da3888881a4763bd38fa62eab1ce3f95a38538e4 100644 (file)
@@ -38,7 +38,7 @@ Abstract:
 \r
 typedef struct _EFI_NIC_IP4_CONFIG_PROTOCOL EFI_NIC_IP4_CONFIG_PROTOCOL;\r
 \r
 \r
 typedef struct _EFI_NIC_IP4_CONFIG_PROTOCOL EFI_NIC_IP4_CONFIG_PROTOCOL;\r
 \r
-typedef enum {\r
+enum {\r
   //\r
   // Config source: dhcp or static\r
   //\r
   //\r
   // Config source: dhcp or static\r
   //\r
@@ -111,7 +111,6 @@ EFI_STATUS
   IN  NIC_ADDR                    *NicAddr       OPTIONAL\r
   );\r
 \r
   IN  NIC_ADDR                    *NicAddr       OPTIONAL\r
   );\r
 \r
-typedef\r
 struct _EFI_NIC_IP4_CONFIG_PROTOCOL {\r
   EFI_NIC_IP4_CONFIG_GET_NAME     GetName;\r
   EFI_NIC_IP4_CONFIG_GET_INFO     GetInfo;\r
 struct _EFI_NIC_IP4_CONFIG_PROTOCOL {\r
   EFI_NIC_IP4_CONFIG_GET_NAME     GetName;\r
   EFI_NIC_IP4_CONFIG_GET_INFO     GetInfo;\r
index 4b8a699aea9bb9bdb4c924a17b1eb2ba973375a3..98df75df11ce78d380ec5c30564676a7666f9bd2 100644 (file)
@@ -47,8 +47,8 @@ EFI_IP4_CONFIG_DATA  mIpIoDefaultIpConfigData = {
   FALSE,\r
   FALSE,\r
   FALSE,\r
   FALSE,\r
   FALSE,\r
   FALSE,\r
-  {0, 0, 0, 0},\r
-  {0, 0, 0, 0},\r
+  {{0, 0, 0, 0}},\r
+  {{0, 0, 0, 0}},\r
   0,\r
   255,\r
   FALSE,\r
   0,\r
   255,\r
   FALSE,\r
index 9057a03a67a91de5c225fe463491caeb706a3f49..0dff772b7ae73ec916f0a98baa901d0cb9f319de 100644 (file)
@@ -77,7 +77,7 @@ IP4_ADDR  mIp4AllMasks[IP4_MASK_NUM] = {
   0xFFFFFFFF,
 };
 
   0xFFFFFFFF,
 };
 
-EFI_IPv4_ADDRESS  mZeroIp4Addr = {0, 0, 0, 0};
+EFI_IPv4_ADDRESS  mZeroIp4Addr = {{0, 0, 0, 0}};
 
 /**\r
   Converts the low nibble of a byte  to hex unicode character.\r
 
 /**\r
   Converts the low nibble of a byte  to hex unicode character.\r
index 812756d551d1f6d8c61ea50533160a7b8ce0992a..d1f89bcfcc58869286259db3ac9db0061c6701c9 100644 (file)
@@ -88,7 +88,7 @@ TERMINAL_DEV  gTerminalDevTemplate = {
   {\r
     0,\r
     0,\r
   {\r
     0,\r
     0,\r
-    { 0 }\r
+    { {0} }\r
   },\r
   NULL, // ControllerNameTable\r
   NULL, \r
   },\r
   NULL, // ControllerNameTable\r
   NULL, \r
index 41554393a5e51d7b59e06172c49d248bb5f5d8d4..64e3bd8fd7241659d233f45cacab1b13464d46d5 100644 (file)
@@ -755,7 +755,7 @@ DhcpHandleRequest (
   //\r
   Message = NULL;\r
 \r
   //\r
   Message = NULL;\r
 \r
-  if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {\r
+  if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {\r
     Message = "Lease confirmed isn't the same as that in the offer";\r
     goto REJECT;\r
   }\r
     Message = "Lease confirmed isn't the same as that in the offer";\r
     goto REJECT;\r
   }\r
@@ -846,7 +846,7 @@ DhcpHandleRenewRebind (
   // The lease is different from the selected. Don't send a DECLINE\r
   // since it isn't existed in the client's FSM.\r
   //\r
   // The lease is different from the selected. Don't send a DECLINE\r
   // since it isn't existed in the client's FSM.\r
   //\r
-  if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {\r
+  if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {\r
     goto ON_EXIT;\r
   }\r
 \r
     goto ON_EXIT;\r
   }\r
 \r
index ee78ceea6c7f11d08a6f8850b43fe4b4e9bc16a0..31d9e8b9034ae0347e87a704de3f7dfba4e80fb1 100644 (file)
@@ -655,7 +655,7 @@ Ip4ConfigOnDhcp4Complete (
     //\r
     // Create a route if there is a default router.\r
     //\r
     //\r
     // Create a route if there is a default router.\r
     //\r
-    if (!EFI_IP4_EQUAL (Dhcp4Mode.RouterAddress, mZeroIp4Addr)) {\r
+    if (!EFI_IP4_EQUAL (&Dhcp4Mode.RouterAddress, &mZeroIp4Addr)) {\r
       Ip4Config->RouteTableSize = 2;\r
 \r
       NetZeroMem (&Ip4Config->RouteTable[1].SubnetAddress, sizeof (EFI_IPv4_ADDRESS));\r
       Ip4Config->RouteTableSize = 2;\r
 \r
       NetZeroMem (&Ip4Config->RouteTable[1].SubnetAddress, sizeof (EFI_IPv4_ADDRESS));\r
index e617d3de80a44f22fc6a5528b527c80482e4a851..40c5daacd885804f82c11534cfa0f6eed2805be6 100644 (file)
@@ -860,8 +860,8 @@ EfiIp4Configure (
       }\r
 \r
       if (!Current->UseDefaultAddress &&\r
       }\r
 \r
       if (!Current->UseDefaultAddress &&\r
-         (!EFI_IP4_EQUAL (Current->StationAddress, IpConfigData->StationAddress) ||\r
-          !EFI_IP4_EQUAL (Current->SubnetMask, IpConfigData->SubnetMask))) {\r
+         (!EFI_IP4_EQUAL (&Current->StationAddress, &IpConfigData->StationAddress) ||\r
+          !EFI_IP4_EQUAL (&Current->SubnetMask, &IpConfigData->SubnetMask))) {\r
         Status = EFI_ALREADY_STARTED;\r
         goto ON_EXIT;\r
       }\r
         Status = EFI_ALREADY_STARTED;\r
         goto ON_EXIT;\r
       }\r
@@ -978,7 +978,7 @@ Ip4Groups (
   for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {\r
     Group = IpInstance->Groups[Index - 1];\r
 \r
   for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {\r
     Group = IpInstance->Groups[Index - 1];\r
 \r
-    if ((GroupAddress == NULL) || EFI_IP4_EQUAL (Group, *GroupAddress)) {\r
+    if ((GroupAddress == NULL) || EFI_IP4_EQUAL (&Group, GroupAddress)) {\r
       if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) {\r
         return EFI_DEVICE_ERROR;\r
       }\r
       if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) {\r
         return EFI_DEVICE_ERROR;\r
       }\r
index 0232bfedda22a5de5f35ec43375cdda0aaa11f66..8aec74ddce98cb372a2695c74ac81543a27579dc 100644 (file)
@@ -306,7 +306,7 @@ Ip4Output (
   // them. Tag each fragment other than the first one as spawn from it.\r
   //\r
   Mtu            = IpSb->SnpMode.MaxPacketSize;\r
   // them. Tag each fragment other than the first one as spawn from it.\r
   //\r
   Mtu            = IpSb->SnpMode.MaxPacketSize;\r
-  HeadLen        = sizeof (IP4_HEAD) + (OptLen + 3) &~0x03;\r
+  HeadLen        = sizeof (IP4_HEAD) + ((OptLen + 3) & (~0x03));\r
   Head->Id       = mIp4Id++;\r
 \r
   if (Packet->TotalSize + HeadLen > Mtu) {\r
   Head->Id       = mIp4Id++;\r
 \r
   if (Packet->TotalSize + HeadLen > Mtu) {\r
index 2d3c4f53458bf3eea88fc871bf2506e85b5ed02a..ca6d83f0428109cd7d30bbd8b7475a98b6b240f5 100644 (file)
@@ -59,7 +59,7 @@ EfiMtftp4GetModeData (
   OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);\r
 \r
   Instance                         = MTFTP4_PROTOCOL_FROM_THIS (This);\r
   OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);\r
 \r
   Instance                         = MTFTP4_PROTOCOL_FROM_THIS (This);\r
-  ModeData->ConfigData             = Instance->Config;\r
+  CopyMem(&ModeData->ConfigData, &Instance->Config, sizeof (Instance->Config));\r
   ModeData->SupportedOptionCount   = MTFTP4_SUPPORTED_OPTIONS;\r
   ModeData->SupportedOptoins       = mMtftp4SupportedOptions;\r
   ModeData->UnsupportedOptionCount = 0;\r
   ModeData->SupportedOptionCount   = MTFTP4_SUPPORTED_OPTIONS;\r
   ModeData->SupportedOptoins       = mMtftp4SupportedOptions;\r
   ModeData->UnsupportedOptionCount = 0;\r
@@ -228,7 +228,7 @@ EfiMtftp4Configure (
       return EFI_ACCESS_DENIED;\r
     }\r
 \r
       return EFI_ACCESS_DENIED;\r
     }\r
 \r
-    Instance->Config = *ConfigData;\r
+    CopyMem(&Instance->Config, ConfigData, sizeof (*ConfigData));;\r
     Instance->State = MTFTP4_STATE_CONFIGED;\r
 \r
     NET_RESTORE_TPL (OldTpl);\r
     Instance->State = MTFTP4_STATE_CONFIGED;\r
 \r
     NET_RESTORE_TPL (OldTpl);\r
index a520349135f1e4bda998adb86ef3d3b330976e81..4b66ac0660b4e4403a7b0b7e625736bed781d829 100644 (file)
@@ -1146,9 +1146,6 @@ PxebcBisDetect (
   return TRUE;\r
 }\r
 \r
   return TRUE;\r
 }\r
 \r
-static VOID *BCNotifyReg;\r
-\r
-\r
 /**\r
   Start and initialize the BaseCode protocol, Simple Network protocol and UNDI.\r
 \r
 /**\r
   Start and initialize the BaseCode protocol, Simple Network protocol and UNDI.\r
 \r
@@ -1559,7 +1556,7 @@ BcStop (
   return StatCode;\r
 }\r
 \r
   return StatCode;\r
 }\r
 \r
-const IPV4_ADDR AllSystemsGroup = { 224, 0, 0, 1 };\r
+const IPV4_ADDR AllSystemsGroup = {{224, 0, 0, 1}};\r
 \r
 \r
 /**\r
 \r
 \r
 /**\r
index 71d1518656f989acf26311125642db5e44f00cc7..f4a19bad60896c0305204155ba171450cf5e2d8e 100644 (file)
@@ -51,7 +51,7 @@ Abstract:
 
 #define SUPPORT_IPV6                  0
 
 
 #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
 
 //
 // 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;
 
 typedef struct {
   UINTN                   Signature;
index d0eb98cfb79eab33542151f703bf61fe7a1d599d..3e04c0d77e1bbfa742a95afa5fafa2488d68fe02 100644 (file)
@@ -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;\r
 STATIC EFI_PXE_BASE_CODE_UDP_PORT PseudoDhcpServerPort  = PXE_DISCOVERY_PORT;\r
 #define PSEUDO_DHCP_CLIENT_PORT PseudoDhcpServerPort\r
 STATIC EFI_PXE_BASE_CODE_UDP_PORT DHCPClientPort        = DHCP_CLIENT_PORT;\r
 STATIC EFI_PXE_BASE_CODE_UDP_PORT PseudoDhcpServerPort  = PXE_DISCOVERY_PORT;\r
 #define PSEUDO_DHCP_CLIENT_PORT PseudoDhcpServerPort\r
-STATIC EFI_IP_ADDRESS             BroadcastIP       = { 0xffffffff };\r
-STATIC EFI_IP_ADDRESS             DefaultSubnetMask = { 0xffffff00 };\r
+STATIC EFI_IP_ADDRESS             BroadcastIP       = {{0xffffffff}};\r
+STATIC EFI_IP_ADDRESS             DefaultSubnetMask = {{0xffffff00}};\r
 \r
 typedef union {\r
   DHCPV4_OP_STRUCT          *OpPtr;\r
 \r
 typedef union {\r
   DHCPV4_OP_STRUCT          *OpPtr;\r
@@ -1470,7 +1470,7 @@ Release (
 \r
   CopyMem (\r
     &DHCPRELEASEoptions.DhcServerIpPtr,\r
 \r
   CopyMem (\r
     &DHCPRELEASEoptions.DhcServerIpPtr,\r
-    &(DHCPV4_OP_SERVER_IP *) DHCPV4_ACK_BUFFER.OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1],\r
+    (DHCPV4_OP_SERVER_IP *) DHCPV4_ACK_BUFFER.OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1],\r
     sizeof DHCPRELEASEoptions.DhcServerIpPtr\r
     );\r
 \r
     sizeof DHCPRELEASEoptions.DhcServerIpPtr\r
     );\r
 \r
index 2278e84a82f5e4e27db4b421d51bfe6726aced17..c714dd3dae9c197dfa12a1dc559ea4c7f720616c 100644 (file)
@@ -681,6 +681,8 @@ Tcp4Dispatcher (
 \r
     return Tcp4Route (Tcb, (TCP4_ROUTE_INFO *) Data);\r
 \r
 \r
     return Tcp4Route (Tcb, (TCP4_ROUTE_INFO *) Data);\r
 \r
+  default:\r
+    return EFI_UNSUPPORTED;\r
   }\r
 \r
   return EFI_SUCCESS;\r
   }\r
 \r
   return EFI_SUCCESS;\r
index 1cc84881118e2c043de0595deb52d80bafb7931d..fdd64ef9f46c0d23f353e8ec659129c8222496b5 100644 (file)
@@ -35,7 +35,7 @@ NET_LIST_ENTRY  mTcpListenQue = {
 \r
 TCP_SEQNO       mTcpGlobalIss = 0x4d7e980b;\r
 \r
 \r
 TCP_SEQNO       mTcpGlobalIss = 0x4d7e980b;\r
 \r
-STATIC CHAR16   *mTcpStateName[] = {\r
+CHAR16   *mTcpStateName[] = {\r
   L"TCP_CLOSED",\r
   L"TCP_LISTEN",\r
   L"TCP_SYN_SENT",\r
   L"TCP_CLOSED",\r
   L"TCP_LISTEN",\r
   L"TCP_SYN_SENT",\r
@@ -267,7 +267,7 @@ TcpFindTcbByPeer (
   NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {\r
     Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
 \r
   NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {\r
     Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
 \r
-    if (EFI_IP4_EQUAL (*Addr, Tcb->LocalEnd.Ip) &&\r
+    if (EFI_IP4_EQUAL (Addr, &Tcb->LocalEnd.Ip) &&\r
       (LocalPort == Tcb->LocalEnd.Port)) {\r
 \r
       return TRUE;\r
       (LocalPort == Tcb->LocalEnd.Port)) {\r
 \r
       return TRUE;\r
@@ -277,7 +277,7 @@ TcpFindTcbByPeer (
   NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {\r
     Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
 \r
   NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {\r
     Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
 \r
-    if (EFI_IP4_EQUAL (*Addr, Tcb->LocalEnd.Ip) &&\r
+    if (EFI_IP4_EQUAL (Addr, &Tcb->LocalEnd.Ip) &&\r
       (LocalPort == Tcb->LocalEnd.Port)) {\r
 \r
       return TRUE;\r
       (LocalPort == Tcb->LocalEnd.Port)) {\r
 \r
       return TRUE;\r
index b81f442a6fc3fc36080f6835e8a121396c9e0d39..7326067532a66996af3144e48ea6717dc18ba2cf 100644 (file)
@@ -33,7 +33,6 @@ TcpGetUint16 (
   return NTOHS (Value);\r
 }\r
 \r
   return NTOHS (Value);\r
 }\r
 \r
-STATIC\r
 VOID\r
 TcpPutUint16 (\r
   IN UINT8  *Buf,\r
 VOID\r
 TcpPutUint16 (\r
   IN UINT8  *Buf,\r
index fac6d33f3e08805f9dff16afc453428cb2c255ae..5cf87c7921d6e32015c009199608ea75a1528fb6 100644 (file)
@@ -424,7 +424,7 @@ Udp4FindInstanceByPort (
       continue;\r
     }\r
 \r
       continue;\r
     }\r
 \r
-    if (EFI_IP4_EQUAL (ConfigData->StationAddress, *Address) &&\r
+    if (EFI_IP4_EQUAL (&ConfigData->StationAddress, Address) &&\r
       (ConfigData->StationPort == Port)) {\r
       //\r
       // if both the address and the port are the same, return TRUE.\r
       (ConfigData->StationPort == Port)) {\r
       //\r
       // if both the address and the port are the same, return TRUE.\r
@@ -566,8 +566,8 @@ Udp4IsReconfigurable (
     }\r
 \r
     if (!NewConfigData->UseDefaultAddress &&\r
     }\r
 \r
     if (!NewConfigData->UseDefaultAddress &&\r
-      (!EFI_IP4_EQUAL (NewConfigData->StationAddress, OldConfigData->StationAddress) ||\r
-      !EFI_IP4_EQUAL (NewConfigData->SubnetMask, OldConfigData->SubnetMask))) {\r
+      (!EFI_IP4_EQUAL (&NewConfigData->StationAddress, &OldConfigData->StationAddress) ||\r
+      !EFI_IP4_EQUAL (&NewConfigData->SubnetMask, &OldConfigData->SubnetMask))) {\r
       //\r
       // If the instance doesn't use the default address, and the new address or\r
       // new subnet mask is different from the old values.\r
       //\r
       // If the instance doesn't use the default address, and the new address or\r
       // new subnet mask is different from the old values.\r
@@ -576,14 +576,14 @@ Udp4IsReconfigurable (
     }\r
   }\r
 \r
     }\r
   }\r
 \r
-  if (!EFI_IP4_EQUAL (NewConfigData->RemoteAddress, OldConfigData->RemoteAddress)) {\r
+  if (!EFI_IP4_EQUAL (&NewConfigData->RemoteAddress, &OldConfigData->RemoteAddress)) {\r
     //\r
     // The remoteaddress is not the same.\r
     //\r
     return FALSE;\r
   }\r
 \r
     //\r
     // The remoteaddress is not the same.\r
     //\r
     return FALSE;\r
   }\r
 \r
-  if (!EFI_IP4_EQUAL (NewConfigData->RemoteAddress, mZeroIp4Addr) && (NewConfigData->RemotePort != OldConfigData->RemotePort)) {\r
+  if (!EFI_IP4_EQUAL (&NewConfigData->RemoteAddress, &mZeroIp4Addr) && (NewConfigData->RemotePort != OldConfigData->RemotePort)) {\r
     //\r
     // The RemotePort differs if it's designated in the configdata.\r
     //\r
     //\r
     // The RemotePort differs if it's designated in the configdata.\r
     //\r
@@ -733,13 +733,13 @@ Udp4ValidateTxToken (
       return EFI_INVALID_PARAMETER;\r
     }\r
 \r
       return EFI_INVALID_PARAMETER;\r
     }\r
 \r
-    if (EFI_IP4_EQUAL (UdpSessionData->DestinationAddress, mZeroIp4Addr)) {\r
+    if (EFI_IP4_EQUAL (&UdpSessionData->DestinationAddress, &mZeroIp4Addr)) {\r
       //\r
       // The DestinationAddress specified in the UdpSessionData is 0.\r
       //\r
       return EFI_INVALID_PARAMETER;\r
     }\r
       //\r
       // The DestinationAddress specified in the UdpSessionData is 0.\r
       //\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-  } else if (EFI_IP4_EQUAL (ConfigData->RemoteAddress, mZeroIp4Addr)) {\r
+  } else if (EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &mZeroIp4Addr)) {\r
     //\r
     // the configured RemoteAddress is all zero, and the user doens't override the\r
     // destination address.\r
     //\r
     // the configured RemoteAddress is all zero, and the user doens't override the\r
     // destination address.\r
@@ -962,7 +962,7 @@ Udp4LeaveGroup (
 \r
   McastIp = Arg;\r
 \r
 \r
   McastIp = Arg;\r
 \r
-  if ((McastIp != NULL) && (!EFI_IP4_EQUAL (*McastIp, (UINTN) Item->Key))) {\r
+  if ((McastIp != NULL) && (!EFI_IP4_EQUAL (McastIp, &(Item->Key)))) {\r
     //\r
     // McastIp is not NULL and the multicast address contained in the Item\r
     // is not the same as McastIp.\r
     //\r
     // McastIp is not NULL and the multicast address contained in the Item\r
     // is not the same as McastIp.\r
@@ -1172,16 +1172,16 @@ Udp4MatchDgram (
     return FALSE;\r
   }\r
 \r
     return FALSE;\r
   }\r
 \r
-  if (!EFI_IP4_EQUAL (ConfigData->RemoteAddress, mZeroIp4Addr) &&\r
-    !EFI_IP4_EQUAL (ConfigData->RemoteAddress, Udp4Session->SourceAddress)) {\r
+  if (!EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &mZeroIp4Addr) &&\r
+    !EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &Udp4Session->SourceAddress)) {\r
     //\r
     // This datagram doesn't come from the instance's specified sender.\r
     //\r
     return FALSE;\r
   }\r
 \r
     //\r
     // This datagram doesn't come from the instance's specified sender.\r
     //\r
     return FALSE;\r
   }\r
 \r
-  if (EFI_IP4_EQUAL (ConfigData->StationAddress, mZeroIp4Addr) ||\r
-    EFI_IP4_EQUAL (Udp4Session->DestinationAddress, ConfigData->StationAddress)) {\r
+  if (EFI_IP4_EQUAL (&ConfigData->StationAddress, &mZeroIp4Addr) ||\r
+    EFI_IP4_EQUAL (&Udp4Session->DestinationAddress, &ConfigData->StationAddress)) {\r
     //\r
     // The instance is configured to receive datagrams destinated to any station IP or\r
     // the destination address of this datagram matches the configured station IP.\r
     //\r
     // The instance is configured to receive datagrams destinated to any station IP or\r
     // the destination address of this datagram matches the configured station IP.\r
@@ -1702,7 +1702,7 @@ Udp4IcmpHandler (
     if (!Instance->Configured ||\r
       Instance->ConfigData.AcceptPromiscuous ||\r
       Instance->ConfigData.AcceptAnyPort ||\r
     if (!Instance->Configured ||\r
       Instance->ConfigData.AcceptPromiscuous ||\r
       Instance->ConfigData.AcceptAnyPort ||\r
-      EFI_IP4_EQUAL (Instance->ConfigData.StationAddress, mZeroIp4Addr)) {\r
+      EFI_IP4_EQUAL (&Instance->ConfigData.StationAddress, &mZeroIp4Addr)) {\r
       //\r
       // Don't try to deliver the ICMP error to this instance if it is not configured,\r
       // or it's configured to be promiscuous or accept any port or accept all the\r
       //\r
       // Don't try to deliver the ICMP error to this instance if it is not configured,\r
       // or it's configured to be promiscuous or accept any port or accept all the\r
index adfd011b7fdffb059e899cbd7232cafbee617c6e..abb2e6fcefd415c5eb36d4fd1a0c0e237a5a4b27 100644 (file)
@@ -604,7 +604,7 @@ Udp4Transmit (
     // Set the SourceAddress, SrcPort and Destination according to the specified\r
     // UdpSessionData.\r
     //\r
     // Set the SourceAddress, SrcPort and Destination according to the specified\r
     // UdpSessionData.\r
     //\r
-    if (!EFI_IP4_EQUAL (UdpSessionData->SourceAddress, mZeroIp4Addr)) {\r
+    if (!EFI_IP4_EQUAL (&UdpSessionData->SourceAddress, &mZeroIp4Addr)) {\r
       NetCopyMem (&Override.SourceAddress, &UdpSessionData->SourceAddress, sizeof (EFI_IPv4_ADDRESS));\r
     }\r
 \r
       NetCopyMem (&Override.SourceAddress, &UdpSessionData->SourceAddress, sizeof (EFI_IPv4_ADDRESS));\r
     }\r
 \r