瀏覽代碼

This makes "-Werror=unused-parameter" not fail.

Signed-off-by: Peter Jones <[email protected]>
Signed-off-by: Nigel Croxon <[email protected]>
Nigel Croxon 9 年之前
父節點
當前提交
3dd05c7b21
共有 12 個文件被更改,包括 33 次插入28 次删除
  1. 3 1
      gnuefi/reloc_aarch64.c
  2. 3 1
      gnuefi/reloc_arm.c
  3. 4 2
      gnuefi/reloc_ia32.c
  4. 5 3
      gnuefi/reloc_x86_64.c
  5. 2 3
      lib/aarch64/initplat.c
  6. 2 3
      lib/arm/initplat.c
  7. 1 1
      lib/dpath.c
  8. 1 1
      lib/hw.c
  9. 2 3
      lib/ia32/initplat.c
  10. 2 3
      lib/ia64/initplat.c
  11. 6 4
      lib/str.c
  12. 2 3
      lib/x86_64/initplat.c

+ 3 - 1
gnuefi/reloc_aarch64.c

@@ -39,7 +39,9 @@
 
 
 #include <elf.h>
 #include <elf.h>
 
 
-EFI_STATUS _relocate (long ldbase, Elf64_Dyn *dyn, EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
+EFI_STATUS _relocate (long ldbase, Elf64_Dyn *dyn,
+		      EFI_HANDLE image __attribute__((__unused__)),
+		      EFI_SYSTEM_TABLE *systab __attribute__((__unused__)))
 {
 {
 	long relsz = 0, relent = 0;
 	long relsz = 0, relent = 0;
 	Elf64_Rela *rel = 0;
 	Elf64_Rela *rel = 0;

+ 3 - 1
gnuefi/reloc_arm.c

@@ -39,7 +39,9 @@
 
 
 #include <elf.h>
 #include <elf.h>
 
 
-EFI_STATUS _relocate (long ldbase, Elf32_Dyn *dyn, EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
+EFI_STATUS _relocate (long ldbase, Elf32_Dyn *dyn,
+		      EFI_HANDLE image __attribute__((__unused__)),
+		      EFI_SYSTEM_TABLE *systab __attribute__((__unused__)))
 {
 {
 	long relsz = 0, relent = 0;
 	long relsz = 0, relent = 0;
 	Elf32_Rel *rel = 0;
 	Elf32_Rel *rel = 0;

+ 4 - 2
gnuefi/reloc_ia32.c

@@ -38,7 +38,9 @@
 
 
 #include <elf.h>
 #include <elf.h>
 
 
-EFI_STATUS _relocate (long ldbase, Elf32_Dyn *dyn, EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
+EFI_STATUS _relocate (long ldbase, Elf32_Dyn *dyn,
+		      EFI_HANDLE image __attribute__((__unused__)),
+		      EFI_SYSTEM_TABLE *systab __attribute__((__unused__)))
 {
 {
 	long relsz = 0, relent = 0;
 	long relsz = 0, relent = 0;
 	Elf32_Rel *rel = 0;
 	Elf32_Rel *rel = 0;
@@ -80,7 +82,7 @@ EFI_STATUS _relocate (long ldbase, Elf32_Dyn *dyn, EFI_HANDLE image, EFI_SYSTEM_
 		switch (ELF32_R_TYPE (rel->r_info)) {
 		switch (ELF32_R_TYPE (rel->r_info)) {
 			case R_386_NONE:
 			case R_386_NONE:
 				break;
 				break;
-			
+
 			case R_386_RELATIVE:
 			case R_386_RELATIVE:
 				addr = (unsigned long *)
 				addr = (unsigned long *)
 					(ldbase + rel->r_offset);
 					(ldbase + rel->r_offset);

+ 5 - 3
gnuefi/reloc_x86_64.c

@@ -40,7 +40,9 @@
 
 
 #include <elf.h>
 #include <elf.h>
 
 
-EFI_STATUS _relocate (long ldbase, Elf64_Dyn *dyn, EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
+EFI_STATUS _relocate (long ldbase, Elf64_Dyn *dyn,
+		      EFI_HANDLE image __attribute__((__unused__)),
+		      EFI_SYSTEM_TABLE *systab __attribute__((__unused__)))
 {
 {
 	long relsz = 0, relent = 0;
 	long relsz = 0, relent = 0;
 	Elf64_Rel *rel = 0;
 	Elf64_Rel *rel = 0;
@@ -71,8 +73,8 @@ EFI_STATUS _relocate (long ldbase, Elf64_Dyn *dyn, EFI_HANDLE image, EFI_SYSTEM_
         if (!rel && relent == 0)
         if (!rel && relent == 0)
                 return EFI_SUCCESS;
                 return EFI_SUCCESS;
 
 
- 	if (!rel || relent == 0)
- 		return EFI_LOAD_ERROR;
+	if (!rel || relent == 0)
+		return EFI_LOAD_ERROR;
 
 
 	while (relsz > 0) {
 	while (relsz > 0) {
 		/* apply the relocs */
 		/* apply the relocs */

+ 2 - 3
lib/aarch64/initplat.c

@@ -19,10 +19,9 @@
 
 
 VOID
 VOID
 InitializeLibPlatform (
 InitializeLibPlatform (
-    IN EFI_HANDLE           ImageHandle,
-    IN EFI_SYSTEM_TABLE     *SystemTable
+    IN EFI_HANDLE           ImageHandle __attribute__((__unused__)),
+    IN EFI_SYSTEM_TABLE     *SystemTable __attribute__((__unused__))
     )
     )
-
 {
 {
 }
 }
 
 

+ 2 - 3
lib/arm/initplat.c

@@ -19,10 +19,9 @@
 
 
 VOID
 VOID
 InitializeLibPlatform (
 InitializeLibPlatform (
-    IN EFI_HANDLE           ImageHandle,
-    IN EFI_SYSTEM_TABLE     *SystemTable
+    IN EFI_HANDLE           ImageHandle __attribute__((__unused__)),
+    IN EFI_SYSTEM_TABLE     *SystemTable __attribute__((__unused__))
     )
     )
-
 {
 {
 }
 }
 
 

+ 1 - 1
lib/dpath.c

@@ -1017,7 +1017,7 @@ _DevPathBssBss (
 static VOID
 static VOID
 _DevPathEndInstance (
 _DevPathEndInstance (
     IN OUT POOL_PRINT       *Str,
     IN OUT POOL_PRINT       *Str,
-    IN VOID                 *DevPath
+    IN VOID                 *DevPath __attribute__((__unused__))
     )
     )
 {
 {
     CatPrint(Str, L",");
     CatPrint(Str, L",");

+ 1 - 1
lib/hw.c

@@ -23,7 +23,7 @@ EFI_STATUS
 InitializeGlobalIoDevice (
 InitializeGlobalIoDevice (
         IN  EFI_DEVICE_PATH             *DevicePath,
         IN  EFI_DEVICE_PATH             *DevicePath,
         IN  EFI_GUID                    *Protocol,
         IN  EFI_GUID                    *Protocol,
-        IN  CHAR8                       *ErrorStr,
+        IN  CHAR8                       *ErrorStr __attribute__((__unused__)),
         OUT EFI_DEVICE_IO_INTERFACE     **GlobalIoFncs 
         OUT EFI_DEVICE_IO_INTERFACE     **GlobalIoFncs 
         )
         )
 /*++
 /*++

+ 2 - 3
lib/ia32/initplat.c

@@ -19,10 +19,9 @@ Revision History
 
 
 VOID
 VOID
 InitializeLibPlatform (
 InitializeLibPlatform (
-    IN EFI_HANDLE           ImageHandle,
-    IN EFI_SYSTEM_TABLE     *SystemTable
+    IN EFI_HANDLE           ImageHandle __attribute__((__unused__)),
+    IN EFI_SYSTEM_TABLE     *SystemTable __attribute__((__unused__))
     )
     )
-
 {
 {
 }
 }
 
 

+ 2 - 3
lib/ia64/initplat.c

@@ -19,10 +19,9 @@ Revision History
 
 
 VOID
 VOID
 InitializeLibPlatform (
 InitializeLibPlatform (
-    IN EFI_HANDLE           ImageHandle,
-    IN EFI_SYSTEM_TABLE     *SystemTable
+    IN EFI_HANDLE           ImageHandle __attribute__((__unused__)),
+    IN EFI_SYSTEM_TABLE     *SystemTable __attribute__((__unused__))
     )
     )
-
 {
 {
     PLABEL  SalPlabel;
     PLABEL  SalPlabel;
     UINT64  PalEntry;
     UINT64  PalEntry;

+ 6 - 4
lib/str.c

@@ -52,7 +52,8 @@ StrnCmp (
 
 
 INTN EFIAPI
 INTN EFIAPI
 LibStubStriCmp (
 LibStubStriCmp (
-    IN EFI_UNICODE_COLLATION_INTERFACE  *This,
+    IN EFI_UNICODE_COLLATION_INTERFACE  *This 
+    __attribute__((__unused__)),
     IN CHAR16                           *s1,
     IN CHAR16                           *s1,
     IN CHAR16                           *s2
     IN CHAR16                           *s2
     )
     )
@@ -62,8 +63,8 @@ LibStubStriCmp (
 
 
 VOID EFIAPI
 VOID EFIAPI
 LibStubStrLwrUpr (
 LibStubStrLwrUpr (
-    IN EFI_UNICODE_COLLATION_INTERFACE  *This,
-    IN CHAR16                           *Str
+    IN EFI_UNICODE_COLLATION_INTERFACE  *This __attribute__((__unused__)),
+    IN CHAR16                           *Str __attribute__((__unused__))
     )
     )
 {
 {
 }
 }
@@ -358,7 +359,8 @@ MetaMatch (
 
 
 BOOLEAN EFIAPI
 BOOLEAN EFIAPI
 LibStubMetaiMatch (
 LibStubMetaiMatch (
-    IN EFI_UNICODE_COLLATION_INTERFACE  *This,
+    IN EFI_UNICODE_COLLATION_INTERFACE  *This 
+    __attribute__((__unused__)),
     IN CHAR16                           *String,
     IN CHAR16                           *String,
     IN CHAR16                           *Pattern
     IN CHAR16                           *Pattern
     )
     )

+ 2 - 3
lib/x86_64/initplat.c

@@ -19,10 +19,9 @@ Revision History
 
 
 VOID
 VOID
 InitializeLibPlatform (
 InitializeLibPlatform (
-    IN EFI_HANDLE           ImageHandle,
-    IN EFI_SYSTEM_TABLE     *SystemTable
+    IN EFI_HANDLE           ImageHandle __attribute__((__unused__)),
+    IN EFI_SYSTEM_TABLE     *SystemTable __attribute__((__unused__))
     )
     )
-
 {
 {
 }
 }