diff options
author | Nigel Croxon <nigel.croxon@hpe.com> | 2016-03-25 13:32:54 -0400 |
---|---|---|
committer | Nigel Croxon <nigel.croxon@hpe.com> | 2016-03-25 13:32:54 -0400 |
commit | 5ff74ecae8b8452e3630bb00611fb610da72ac59 (patch) | |
tree | 682118a6d6f355f7dd01de25c8ae479a67b7358c /gnuefi | |
parent | 1acb1d9dae8192e72e3de7ac826f47263fe280c5 (diff) | |
download | gnu-efi-5ff74ecae8b8452e3630bb00611fb610da72ac59.tar.gz |
Commit 3dd05c and subsequent ones introduced the use of the GNU
specific __attribute__((__unused__)), which breaks MSVC compilation...
I'll use this as a reminder that gnu-efi is compiled with more than
GNU toolchains, and that contributors might want to be careful about
adding GNU-specific extensions...
This patch does the following:
Create a new eficompiler.h header that sets all compiler-specific
options and extensions
Create a new EFI_UNUSED macro to be used in lieu of
__attribute__((__unused__)) and applies it to the relevant sources
Move the ALIGN(x) macro, previously defined in efisetjmp.h to the new header
Oh, and it also fixes a bunch of trailing whitespaces (because my code
editor is set to do just that by default).
Signed-off-by: Pete Batard <pbatard@users.sf.net>
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
Diffstat (limited to 'gnuefi')
-rw-r--r-- | gnuefi/reloc_aarch64.c | 4 | ||||
-rw-r--r-- | gnuefi/reloc_arm.c | 4 | ||||
-rw-r--r-- | gnuefi/reloc_ia32.c | 4 | ||||
-rw-r--r-- | gnuefi/reloc_x86_64.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/gnuefi/reloc_aarch64.c b/gnuefi/reloc_aarch64.c index 2f3d5bd..0867279 100644 --- a/gnuefi/reloc_aarch64.c +++ b/gnuefi/reloc_aarch64.c @@ -40,8 +40,8 @@ #include <elf.h> EFI_STATUS _relocate (long ldbase, Elf64_Dyn *dyn, - EFI_HANDLE image __attribute__((__unused__)), - EFI_SYSTEM_TABLE *systab __attribute__((__unused__))) + EFI_HANDLE image EFI_UNUSED, + EFI_SYSTEM_TABLE *systab EFI_UNUSED) { long relsz = 0, relent = 0; Elf64_Rela *rel = 0; diff --git a/gnuefi/reloc_arm.c b/gnuefi/reloc_arm.c index bafff3e..7585066 100644 --- a/gnuefi/reloc_arm.c +++ b/gnuefi/reloc_arm.c @@ -40,8 +40,8 @@ #include <elf.h> EFI_STATUS _relocate (long ldbase, Elf32_Dyn *dyn, - EFI_HANDLE image __attribute__((__unused__)), - EFI_SYSTEM_TABLE *systab __attribute__((__unused__))) + EFI_HANDLE image EFI_UNUSED, + EFI_SYSTEM_TABLE *systab EFI_UNUSED) { long relsz = 0, relent = 0; Elf32_Rel *rel = 0; diff --git a/gnuefi/reloc_ia32.c b/gnuefi/reloc_ia32.c index 0a8d482..da9d8a7 100644 --- a/gnuefi/reloc_ia32.c +++ b/gnuefi/reloc_ia32.c @@ -39,8 +39,8 @@ #include <elf.h> EFI_STATUS _relocate (long ldbase, Elf32_Dyn *dyn, - EFI_HANDLE image __attribute__((__unused__)), - EFI_SYSTEM_TABLE *systab __attribute__((__unused__))) + EFI_HANDLE image EFI_UNUSED, + EFI_SYSTEM_TABLE *systab EFI_UNUSED) { long relsz = 0, relent = 0; Elf32_Rel *rel = 0; diff --git a/gnuefi/reloc_x86_64.c b/gnuefi/reloc_x86_64.c index 6f241bf..04b75b2 100644 --- a/gnuefi/reloc_x86_64.c +++ b/gnuefi/reloc_x86_64.c @@ -41,8 +41,8 @@ #include <elf.h> EFI_STATUS _relocate (long ldbase, Elf64_Dyn *dyn, - EFI_HANDLE image __attribute__((__unused__)), - EFI_SYSTEM_TABLE *systab __attribute__((__unused__))) + EFI_HANDLE image EFI_UNUSED, + EFI_SYSTEM_TABLE *systab EFI_UNUSED) { long relsz = 0, relent = 0; Elf64_Rel *rel = 0; |