]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Bus/Pci/Uhci/Dxe/uhchlp.c
Partially make EdkModulePkg pass intel IPF compiler with /W4 /WX switched on.
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / Uhci / Dxe / uhchlp.c
index 74ddc6bb125c40c0646e915669839b05c39839f3..8dbc0d9a333da5ac62800611b3dbe4e9a0ceffc5 100644 (file)
@@ -21,6 +21,7 @@ Revision History
 \r
 #include "uhci.h"\r
 \r
+STATIC\r
 EFI_STATUS\r
 USBReadPortW (\r
   IN       EFI_PCI_IO_PROTOCOL     *PciIo,\r
@@ -58,6 +59,7 @@ Returns:
                      );\r
 }\r
 \r
+STATIC\r
 EFI_STATUS\r
 USBReadPortDW (\r
   IN       EFI_PCI_IO_PROTOCOL     *PciIo,\r
@@ -95,6 +97,7 @@ Returns:
                      );\r
 }\r
 \r
+STATIC\r
 EFI_STATUS\r
 USBWritePortW (\r
   IN EFI_PCI_IO_PROTOCOL     *PciIo,\r
@@ -132,6 +135,7 @@ Returns:
                      );\r
 }\r
 \r
+STATIC\r
 EFI_STATUS\r
 USBWritePortDW (\r
   IN EFI_PCI_IO_PROTOCOL     *PciIo,\r
@@ -654,13 +658,12 @@ Returns:
 --*/\r
 {\r
   UINT16      CommandContent;\r
-  EFI_STATUS  Status;\r
 \r
-  Status = ReadUHCCommandReg (\r
-             HcDev->PciIo,\r
-             (UINT32) (USBCMD),\r
-             &CommandContent\r
-             );\r
+  ReadUHCCommandReg (\r
+    HcDev->PciIo,\r
+    (UINT32) (USBCMD),\r
+    &CommandContent\r
+    );\r
 \r
   if ((CommandContent & USBCMD_MAXP) != USBCMD_MAXP) {\r
     CommandContent |= USBCMD_MAXP;\r
@@ -835,6 +838,7 @@ Returns:
 //\r
 // functions for QH\r
 //\r
+STATIC\r
 EFI_STATUS\r
 AllocateQHStruct (\r
   IN  USB_HC_DEV     *HcDev,\r
@@ -1196,6 +1200,7 @@ Returns:
   return (BOOLEAN) (!(PtrQH->QH.QHVerticalTerminate));\r
 }\r
 \r
+STATIC\r
 BOOLEAN\r
 GetQHHorizontalValidorInvalid (\r
   IN QH_STRUCT     *PtrQH\r
@@ -1769,6 +1774,7 @@ Returns:
   return (VOID *) ((UINTN) (ptrTDStruct->TDData.TDLinkPtr << 4));\r
 }\r
 \r
+STATIC\r
 BOOLEAN\r
 IsTDLinkPtrQHOrTD (\r
   IN TD_STRUCT     *ptrTDStruct\r
@@ -2325,6 +2331,7 @@ SetCurFrameListQHorTD (
   pCurEntry->FrameListPtrQSelect = (IsQH ? 1 : 0);\r
 }\r
 \r
+STATIC\r
 BOOLEAN\r
 IsCurFrameListQHorTD (\r
   IN FRAMELIST_ENTRY     *pCurEntry\r
@@ -3854,7 +3861,7 @@ Returns:
       //\r
       for (Index = StartBytePos, Index2 = StartBitPos, Count = 0; Count < (RealAllocSize / 32); Count++) {\r
 \r
-        TempHeaderPtr->BitArrayPtr[Index] ^= (UINT8) (bit (Index2));\r
+        TempHeaderPtr->BitArrayPtr[Index] = (UINT8) (TempHeaderPtr->BitArrayPtr[Index] ^ bit (Index2));\r
         Index2++;\r
         if (Index2 == 8) {\r
           Index += 1;\r
@@ -4067,7 +4074,7 @@ Returns:
   for (TempBytePos = FoundBytePos, Index = FoundBitPos,Count = 0;\r
        Count < NumberOfMemoryUnit; Count ++) {\r
 \r
-    MemoryHeader->BitArrayPtr[TempBytePos] |= bit (Index);\r
+    MemoryHeader->BitArrayPtr[TempBytePos] = (UINT8) (MemoryHeader->BitArrayPtr[TempBytePos] | bit (Index));\r
     Index++;\r
     if (Index == 8) {\r
       TempBytePos += 1;\r