Browse Source

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

Signed-off-by: Peter Jones <[email protected]>
Signed-off-by: Nigel Croxon <[email protected]>
Nigel Croxon 9 years ago
parent
commit
3dd05c7b21

+ 3 - 1
gnuefi/reloc_aarch64.c

@@ -39,7 +39,9 @@
 
 #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;
 	Elf64_Rela *rel = 0;

+ 3 - 1
gnuefi/reloc_arm.c

@@ -39,7 +39,9 @@
 
 #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;
 	Elf32_Rel *rel = 0;

+ 4 - 2
gnuefi/reloc_ia32.c

@@ -38,7 +38,9 @@
 
 #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;
 	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)) {
 			case R_386_NONE:
 				break;
-			
+
 			case R_386_RELATIVE:
 				addr = (unsigned long *)
 					(ldbase + rel->r_offset);

+ 5 - 3
gnuefi/reloc_x86_64.c

@@ -40,7 +40,9 @@
 
 #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;
 	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)
                 return EFI_SUCCESS;
 
- 	if (!rel || relent == 0)
- 		return EFI_LOAD_ERROR;
+	if (!rel || relent == 0)
+		return EFI_LOAD_ERROR;
 
 	while (relsz > 0) {
 		/* apply the relocs */

+ 2 - 3
lib/aarch64/initplat.c

@@ -19,10 +19,9 @@
 
 VOID
 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
 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
 _DevPathEndInstance (
     IN OUT POOL_PRINT       *Str,
-    IN VOID                 *DevPath
+    IN VOID                 *DevPath __attribute__((__unused__))
     )
 {
     CatPrint(Str, L",");

+ 1 - 1
lib/hw.c

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

+ 2 - 3
lib/ia32/initplat.c

@@ -19,10 +19,9 @@ Revision History
 
 VOID
 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
 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;
     UINT64  PalEntry;

+ 6 - 4
lib/str.c

@@ -52,7 +52,8 @@ StrnCmp (
 
 INTN EFIAPI
 LibStubStriCmp (
-    IN EFI_UNICODE_COLLATION_INTERFACE  *This,
+    IN EFI_UNICODE_COLLATION_INTERFACE  *This 
+    __attribute__((__unused__)),
     IN CHAR16                           *s1,
     IN CHAR16                           *s2
     )
@@ -62,8 +63,8 @@ LibStubStriCmp (
 
 VOID EFIAPI
 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
 LibStubMetaiMatch (
-    IN EFI_UNICODE_COLLATION_INTERFACE  *This,
+    IN EFI_UNICODE_COLLATION_INTERFACE  *This 
+    __attribute__((__unused__)),
     IN CHAR16                           *String,
     IN CHAR16                           *Pattern
     )

+ 2 - 3
lib/x86_64/initplat.c

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