]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Fix GCC 4.4 build issues
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 12 Apr 2011 03:18:38 +0000 (03:18 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 12 Apr 2011 03:18:38 +0000 (03:18 +0000)
This change fixes various GCC 4.4 build issues
* EFIAPI usage inconsistencies
* multi-character literal warning ('eell')
* Filename case inconsistencies
* Use 'ULL' suffix for integers > 4GB

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11519 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditorTypes.h
ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.h
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEditorTypes.h
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MemImage.c
ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/LibSmbiosView.c
ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/Smbios.c
ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c

index 713332ea0d837e2b2258467718a74dea960d5ab1..1a8f39a229fc60f5e8dc0283208fe601ccaf9ba8 100644 (file)
@@ -24,7 +24,6 @@
   @retval EFI_OUT_OF_RESOURCES    A memory allocation failed.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandOpenFile (\r
   VOID\r
   );\r
@@ -35,7 +34,6 @@ MainCommandOpenFile (
   @retval EFI_SUCCESS           The switch was ok or a warning was presented.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandSwitchFileType (\r
   VOID\r
   );\r
@@ -46,7 +44,6 @@ MainCommandSwitchFileType (
   @retval EFI_SUCCESS             The operation was successful.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandGotoLine (\r
   VOID\r
   );\r
@@ -60,7 +57,6 @@ MainCommandGotoLine (
   @retval EFI_LOAD_ERROR          A file access error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandSaveFile (\r
   VOID\r
   );\r
@@ -73,7 +69,6 @@ MainCommandSaveFile (
   @retval EFI_LOAD_ERROR          A load error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandExit (\r
   VOID\r
   );\r
@@ -86,7 +81,6 @@ MainCommandExit (
   @retval EFI_LOAD_ERROR          A load error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandSearch (\r
   VOID\r
   );\r
@@ -99,7 +93,6 @@ MainCommandSearch (
   @retval EFI_LOAD_ERROR          A load error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandSearchReplace (\r
   VOID\r
   );\r
@@ -112,7 +105,6 @@ MainCommandSearchReplace (
   @retval EFI_LOAD_ERROR          A load error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandCutLine (\r
   VOID\r
   );\r
@@ -125,7 +117,6 @@ MainCommandCutLine (
   @retval EFI_LOAD_ERROR          A load error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandPasteLine (\r
   VOID\r
   );\r
@@ -195,7 +186,6 @@ EDITOR_MENU_ITEM  MainMenuItems[] = {
   @retval EFI_OUT_OF_RESOURCES    A memory allocation failed.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandOpenFile (\r
   VOID\r
   )\r
@@ -350,7 +340,6 @@ MainCommandOpenFile (
   @retval EFI_SUCCESS           The switch was ok or a warning was presented.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandSwitchFileType (\r
   VOID\r
   )\r
@@ -384,7 +373,6 @@ MainCommandSwitchFileType (
   @retval EFI_LOAD_ERROR          A load error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandCutLine (\r
   VOID\r
   )\r
@@ -422,7 +410,6 @@ MainCommandCutLine (
   @retval EFI_LOAD_ERROR          A load error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandPasteLine (\r
   VOID\r
   )\r
@@ -455,7 +442,6 @@ MainCommandPasteLine (
   @retval EFI_LOAD_ERROR          A load error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandSearch (\r
   VOID\r
   )\r
@@ -597,7 +583,6 @@ MainCommandSearch (
   @retval EFI_LOAD_ERROR          A load error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandSearchReplace (\r
   VOID\r
   )\r
@@ -901,7 +886,6 @@ MainCommandSearchReplace (
   @retval EFI_LOAD_ERROR          A load error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandExit (\r
   VOID\r
   )\r
@@ -983,7 +967,6 @@ MainCommandExit (
   @retval EFI_SUCCESS             The operation was successful.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandGotoLine (\r
   VOID\r
   )\r
@@ -1057,7 +1040,6 @@ MainCommandGotoLine (
   @retval EFI_LOAD_ERROR          A file access error occured.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 MainCommandSaveFile (\r
   VOID\r
   )\r
index 9bcf39e028bc93230f2dfbfb2af8a53675d337ec..dfd56dd9a6eced196624b41a58853498c5670301 100644 (file)
@@ -42,7 +42,7 @@ typedef enum {
   NewLineTypeUnknown\r
 } EE_NEWLINE_TYPE;\r
 \r
-#define LINE_LIST_SIGNATURE  'eell'\r
+#define LINE_LIST_SIGNATURE  SIGNATURE_32 ('e', 'e', 'l', 'l')\r
 typedef struct _EFI_EDITOR_LINE {\r
   UINTN           Signature;\r
   CHAR16          *Buffer;\r
index 407f259fca74f91a2080e41016f5d2c666187898..41dccf677234ef7c334452030e446d98fc88dd8f 100644 (file)
@@ -17,7 +17,7 @@
 \r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *MENU_ITEM_FUNCTION) (\r
+(*MENU_ITEM_FUNCTION) (\r
   VOID\r
   );\r
 \r
index 2849f2b413a00d3db47ae730dbdd6d1e7f5c58c7..22f5c055666b0cd426a3b85b86e5ec5a1c79db2c 100644 (file)
@@ -18,7 +18,7 @@
 #include "UefiShellDebug1CommandsLib.h"\r
 #include "EditTitleBar.h"\r
 \r
-#define EFI_EDITOR_LINE_LIST  'eell'\r
+#define EFI_EDITOR_LINE_LIST  SIGNATURE_32 ('e', 'e', 'l', 'l')\r
 \r
 #define ASCII_POSITION        ((0x10 * 3) + 12)\r
 \r
index a593d0afecda19f6feacc590da5792f0b82192d0..f327c5aedeed60281f9b754b65c9e9eef8e12612 100644 (file)
@@ -50,6 +50,7 @@ HEFI_EDITOR_MEM_IMAGE             HMemImageConst = {
   @retval EFI_UNSUPPORTED.\r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 DummyMemRead (\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL              * This,\r
   IN     EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH    Width,\r
@@ -73,6 +74,7 @@ DummyMemRead (
   @retval EFI_UNSUPPORTED.\r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 DummyMemWrite (\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL              * This,\r
   IN     EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH    Width,\r
index 65effc731f98b9f0e57734053094b3ab9f1f0547..3f4147f9a115dce0a3f4238636208d3a55c96409 100644 (file)
@@ -3199,8 +3199,8 @@ PciExplainBar (
     } else if ((*Bar & PCI_BIT_1) == 0 && (*Bar & PCI_BIT_2) != 0) {\r
       Bar64 = 0x0;\r
       CopyMem (&Bar64, Bar, sizeof (UINT64));\r
-      ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_PCI2_ONE_VAR_2), gShellDebug1HiiHandle, RShiftU64 ((Bar64 & 0xfffffffffffffff0), 32));\r
-      ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_PCI2_ONE_VAR_3), gShellDebug1HiiHandle, (UINT32) (Bar64 & 0xfffffffffffffff0));\r
+      ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_PCI2_ONE_VAR_2), gShellDebug1HiiHandle, RShiftU64 ((Bar64 & 0xfffffffffffffff0ULL), 32));\r
+      ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_PCI2_ONE_VAR_3), gShellDebug1HiiHandle, (UINT32) (Bar64 & 0xfffffffffffffff0ULL));\r
       ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_PCI2_MEM), gShellDebug1HiiHandle);\r
       ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_PCI2_64_BITS), gShellDebug1HiiHandle);\r
       IsBar32 = FALSE;\r
@@ -3271,18 +3271,18 @@ PciExplainBar (
 \r
     OldBar64 = 0x0;\r
     CopyMem (&OldBar64, Bar, sizeof (UINT64));\r
-    NewBar64 = 0xffffffffffffffff;\r
+    NewBar64 = 0xffffffffffffffffULL;\r
 \r
     IoDev->Pci.Write (IoDev, EfiPciWidthUint32, RegAddress, 2, &NewBar64);\r
     IoDev->Pci.Read (IoDev, EfiPciWidthUint32, RegAddress, 2, &NewBar64);\r
     IoDev->Pci.Write (IoDev, EfiPciWidthUint32, RegAddress, 2, &OldBar64);\r
 \r
     if (IsMem) {\r
-      NewBar64  = NewBar64 & 0xfffffffffffffff0;\r
+      NewBar64  = NewBar64 & 0xfffffffffffffff0ULL;\r
       NewBar64  = (~NewBar64) + 1;\r
 \r
     } else {\r
-      NewBar64  = NewBar64 & 0xfffffffffffffffc;\r
+      NewBar64  = NewBar64 & 0xfffffffffffffffcULL;\r
       NewBar64  = (~NewBar64) + 1;\r
       NewBar64  = NewBar64 & 0x000000000000ffff;\r
     }\r
@@ -3305,9 +3305,9 @@ PciExplainBar (
       ShellPrintHiiEx(-1, -1, NULL,\r
         STRING_TOKEN (STR_PCI2_RSHIFT),\r
         gShellDebug1HiiHandle,\r
-        RShiftU64 ((NewBar64 + (Bar64 & 0xfffffffffffffff0) - 1), 32)\r
+        RShiftU64 ((NewBar64 + (Bar64 & 0xfffffffffffffff0ULL) - 1), 32)\r
        );\r
-      ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_PCI2_RSHIFT), gShellDebug1HiiHandle, (UINT32) (NewBar64 + (Bar64 & 0xfffffffffffffff0) - 1));\r
+      ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_PCI2_RSHIFT), gShellDebug1HiiHandle, (UINT32) (NewBar64 + (Bar64 & 0xfffffffffffffff0ULL) - 1));\r
 \r
     }\r
   } else {\r
index 409f6840ef6b648ba81209c84654ee4c41bba002..9e995683d0e6f2505c708bc1403a36a7ce6dca9e 100644 (file)
@@ -14,8 +14,8 @@
     \r
 \r
 #include "../UefiShellDebug1CommandsLib.h"\r
-#include <Guid/Smbios.h>\r
-#include "LIbSmbios.h"\r
+#include <Guid/SmBios.h>\r
+#include "LibSmbios.h"\r
 #include "LibSmbiosView.h"\r
 #include "SmbiosView.h"\r
 \r
index 8df7c8112394733fc7a4dc2e64214a6082e76556..7e627b98bd3f0d5d68e7d69c022da6623a32550d 100644 (file)
@@ -13,7 +13,7 @@
 **/\r
 \r
 #include "../UefiShellDebug1CommandsLib.h"\r
-#include <Guid/Smbios.h>\r
+#include <Guid/SmBios.h>\r
 #include "LibSmbios.h"\r
 \r
 /**\r
index cccec126b4d9dc20be22752c3a706d9e53daa04a..66345b4b7237b836dd5355b27a81a0522e063eb7 100644 (file)
@@ -150,7 +150,6 @@ STATIC CONST CHAR8 Hex[] = {
   @param[in] UserData   The data to print out.\r
 **/\r
 VOID\r
-EFIAPI\r
 DumpHex (\r
   IN UINTN        Indent,\r
   IN UINTN        Offset,\r