diff options
author | Simon Horman <horms@verge.net.au> | 2010-02-02 14:42:02 +1100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2010-02-02 14:42:02 +1100 |
commit | 43836a235786b40b100cc1691da9720aa9c5352d (patch) | |
tree | a9c0e8042cf8dc081be66028e53cfcbc9edd3c14 | |
parent | c59af3ab34f41f259eb2f019e9f5f9ad3229893f (diff) |
Mark unused parameters
Signed-off-by: Simon Horman <horms@verge.net.au>
34 files changed, 89 insertions, 60 deletions
diff --git a/include/unused.h b/include/unused.h new file mode 100644 index 0000000..7b40190 --- /dev/null +++ b/include/unused.h @@ -0,0 +1,15 @@ +#ifndef UNUSED_H +#define UNUSED_H + +/* http://sourcefrog.net/weblog/software/languages/C/unused.html */ + +#ifdef UNUSED +#elif defined(__GNUC__) +# define UNUSED(x) UNUSED_ ## x __attribute__((unused)) +#elif defined(__LCLINT__) +# define UNUSED(x) /*@unused@*/ x +#else +# define UNUSED(x) x +#endif + +#endif diff --git a/kexec/arch/arm/kexec-arm.c b/kexec/arch/arm/kexec-arm.c index 4b4a659..beca772 100644 --- a/kexec/arch/arm/kexec-arm.c +++ b/kexec/arch/arm/kexec-arm.c @@ -23,7 +23,7 @@ static struct memory_range memory_range[MAX_MEMORY_RANGES]; /* Return a sorted list of available memory ranges. */ int get_memory_ranges(struct memory_range **range, int *ranges, - unsigned long kexec_flags) + unsigned long UNUSED(kexec_flags)) { const char *iomem = proc_iomem(); int memory_ranges = 0; @@ -116,12 +116,12 @@ const struct arch_map_entry arches[] = { { 0 }, }; -int arch_compat_trampoline(struct kexec_info *info) +int arch_compat_trampoline(struct kexec_info *UNUSED(info)) { return 0; } -void arch_update_purgatory(struct kexec_info *info) +void arch_update_purgatory(struct kexec_info *UNUSED(info)) { } diff --git a/kexec/arch/arm/kexec-elf-rel-arm.c b/kexec/arch/arm/kexec-elf-rel-arm.c index 4e3ffd7..214f0cc 100644 --- a/kexec/arch/arm/kexec-elf-rel-arm.c +++ b/kexec/arch/arm/kexec-elf-rel-arm.c @@ -18,7 +18,7 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr) return 1; } -void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type, +void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), unsigned long r_type, void *location, unsigned long address, unsigned long value) { switch(r_type) { diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c index 5eb4905..ff6e2ac 100644 --- a/kexec/arch/arm/kexec-zImage-arm.c +++ b/kexec/arch/arm/kexec-zImage-arm.c @@ -78,7 +78,7 @@ struct tag { #define byte_size(t) ((t)->hdr.size << 2) #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type) + 3) >> 2) -int zImage_arm_probe(const char *buf, off_t len) +int zImage_arm_probe(const char *UNUSED(buf), off_t UNUSED(len)) { /* * Only zImage loading is supported. Do not check if diff --git a/kexec/arch/cris/kexec-cris.c b/kexec/arch/cris/kexec-cris.c index 540ec6f..30df27e 100644 --- a/kexec/arch/cris/kexec-cris.c +++ b/kexec/arch/cris/kexec-cris.c @@ -23,7 +23,8 @@ static struct memory_range memory_range[MAX_MEMORY_RANGES]; /* Return a sorted list of memory ranges. */ -int get_memory_ranges(struct memory_range **range, int *ranges, unsigned long kexec_flags) +int get_memory_ranges(struct memory_range **range, int *ranges, + unsigned long UNUSED(kexec_flags)) { int memory_ranges = 0; @@ -79,12 +80,12 @@ const struct arch_map_entry arches[] = { { 0 }, }; -int arch_compat_trampoline(struct kexec_info *info) +int arch_compat_trampoline(struct kexec_info *UNUSED(info)) { return 0; } -void arch_update_purgatory(struct kexec_info *info) +void arch_update_purgatory(struct kexec_info *UNUSED(info)) { } diff --git a/kexec/arch/i386/kexec-beoboot-x86.c b/kexec/arch/i386/kexec-beoboot-x86.c index 2b1c34b..dd7f098 100644 --- a/kexec/arch/i386/kexec-beoboot-x86.c +++ b/kexec/arch/i386/kexec-beoboot-x86.c @@ -75,7 +75,7 @@ void beoboot_usage(void) #define KERN32_BASE 0x100000 /* 1MB */ #define INITRD_BASE 0x1000000 /* 16MB */ -int beoboot_load(int argc, char **argv, const char *buf, off_t len, +int beoboot_load(int argc, char **argv, const char *buf, off_t UNUSED(len), struct kexec_info *info) { struct beoboot_header bb_header; diff --git a/kexec/arch/i386/kexec-elf-rel-x86.c b/kexec/arch/i386/kexec-elf-rel-x86.c index e2f1748..fdc3d52 100644 --- a/kexec/arch/i386/kexec-elf-rel-x86.c +++ b/kexec/arch/i386/kexec-elf-rel-x86.c @@ -18,7 +18,7 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr) return 1; } -void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type, +void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), unsigned long r_type, void *location, unsigned long address, unsigned long value) { switch(r_type) { diff --git a/kexec/arch/i386/kexec-nbi.c b/kexec/arch/i386/kexec-nbi.c index 19ae631..469d669 100644 --- a/kexec/arch/i386/kexec-nbi.c +++ b/kexec/arch/i386/kexec-nbi.c @@ -150,7 +150,7 @@ void nbi_usage(void) ); } -int nbi_load(int argc, char **argv, const char *buf, off_t len, +int nbi_load(int argc, char **argv, const char *buf, off_t UNUSED(len), struct kexec_info *info) { struct imgheader hdr; diff --git a/kexec/arch/ia64/kexec-ia64.c b/kexec/arch/ia64/kexec-ia64.c index e6e944a..312430f 100644 --- a/kexec/arch/ia64/kexec-ia64.c +++ b/kexec/arch/ia64/kexec-ia64.c @@ -211,7 +211,7 @@ const struct arch_map_entry arches[] = { { 0 }, }; -int arch_compat_trampoline(struct kexec_info *info) +int arch_compat_trampoline(struct kexec_info *UNUSED(info)) { return 0; } @@ -255,7 +255,7 @@ int update_loaded_segments(struct kexec_info *info, struct mem_ehdr *ehdr) return -1; } -void arch_update_purgatory(struct kexec_info *info) +void arch_update_purgatory(struct kexec_info *UNUSED(info)) { } diff --git a/kexec/arch/mips/kexec-elf-rel-mips.c b/kexec/arch/mips/kexec-elf-rel-mips.c index 6442fb9..6f43639 100644 --- a/kexec/arch/mips/kexec-elf-rel-mips.c +++ b/kexec/arch/mips/kexec-elf-rel-mips.c @@ -29,8 +29,10 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr) return 1; } -void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type, - void *location, unsigned long address, unsigned long value) +void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), unsigned long r_type, + void *UNUSED(location), + unsigned long UNUSED(address), + unsigned long UNUSED(value)) { switch(r_type) { diff --git a/kexec/arch/mips/kexec-mips.c b/kexec/arch/mips/kexec-mips.c index e4ec71b..bf6d193 100644 --- a/kexec/arch/mips/kexec-mips.c +++ b/kexec/arch/mips/kexec-mips.c @@ -26,7 +26,8 @@ static struct memory_range memory_range[MAX_MEMORY_RANGES]; /* Return a sorted list of memory ranges. */ -int get_memory_ranges(struct memory_range **range, int *ranges, unsigned long kexec_flags) +int get_memory_ranges(struct memory_range **range, int *ranges, + unsigned long UNUSED(kexec_flags)) { int memory_ranges = 0; @@ -129,12 +130,12 @@ const struct arch_map_entry arches[] = { { 0 }, }; -int arch_compat_trampoline(struct kexec_info *info) +int arch_compat_trampoline(struct kexec_info *UNUSED(info)) { return 0; } -void arch_update_purgatory(struct kexec_info *info) +void arch_update_purgatory(struct kexec_info *UNUSED(info)) { } diff --git a/kexec/arch/ppc/kexec-dol-ppc.c b/kexec/arch/ppc/kexec-dol-ppc.c index e2a197a..429c8ab 100644 --- a/kexec/arch/ppc/kexec-dol-ppc.c +++ b/kexec/arch/ppc/kexec-dol-ppc.c @@ -316,7 +316,7 @@ void dol_ppc_usage(void) } -int dol_ppc_load(int argc, char **argv, const char *buf, off_t len, +int dol_ppc_load(int argc, char **argv, const char *buf, off_t UNUSED(len), struct kexec_info *info) { dol_header header, *h; diff --git a/kexec/arch/ppc/kexec-elf-rel-ppc.c b/kexec/arch/ppc/kexec-elf-rel-ppc.c index e711f3b..7aa92db 100644 --- a/kexec/arch/ppc/kexec-elf-rel-ppc.c +++ b/kexec/arch/ppc/kexec-elf-rel-ppc.c @@ -17,7 +17,7 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr) return 1; } -void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type, +void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), unsigned long r_type, void *location, unsigned long address, unsigned long value) { switch(r_type) { diff --git a/kexec/arch/ppc/kexec-ppc.c b/kexec/arch/ppc/kexec-ppc.c index ef4fe35..511b027 100644 --- a/kexec/arch/ppc/kexec-ppc.c +++ b/kexec/arch/ppc/kexec-ppc.c @@ -23,8 +23,8 @@ static struct memory_range memory_range[MAX_MEMORY_RANGES]; /* Return a sorted list of memory ranges. */ -int get_memory_ranges(struct memory_range **range, int *ranges, - unsigned long kexec_flags) +int get_memory_ranges(struct memory_range **UNUSED(range), int *UNUSED(ranges), + unsigned long UNUSED(kexec_flags)) { #ifdef WITH_GAMECUBE int memory_ranges = 0; @@ -83,12 +83,12 @@ const struct arch_map_entry arches[] = { { 0 }, }; -int arch_compat_trampoline(struct kexec_info *info) +int arch_compat_trampoline(struct kexec_info *UNUSED(info)) { return 0; } -void arch_update_purgatory(struct kexec_info *info) +void arch_update_purgatory(struct kexec_info *UNUSED(info)) { } diff --git a/kexec/arch/ppc64/kexec-ppc64.c b/kexec/arch/ppc64/kexec-ppc64.c index 758e547..ab671fd 100644 --- a/kexec/arch/ppc64/kexec-ppc64.c +++ b/kexec/arch/ppc64/kexec-ppc64.c @@ -804,11 +804,11 @@ const struct arch_map_entry arches[] = { { 0 }, }; -int arch_compat_trampoline(struct kexec_info *info) +int arch_compat_trampoline(struct kexec_info *UNUSED(info)) { return 0; } -void arch_update_purgatory(struct kexec_info *info) +void arch_update_purgatory(struct kexec_info *UNUSED(info)) { } diff --git a/kexec/arch/ppc64/kexec-zImage-ppc64.c b/kexec/arch/ppc64/kexec-zImage-ppc64.c index 86cf48a..24a87c6 100644 --- a/kexec/arch/ppc64/kexec-zImage-ppc64.c +++ b/kexec/arch/ppc64/kexec-zImage-ppc64.c @@ -63,8 +63,9 @@ int zImage_ppc64_probe(FILE *file) elf.e_machine == EM_PPC); } -int zImage_ppc64_load(FILE *file, int argc, char **argv, void **ret_entry, - struct kexec_segment **ret_segments, int *ret_nr_segments) +int zImage_ppc64_load(FILE *file, int UNUSED(argc), char **UNUSED(argv), + void **ret_entry, struct kexec_segment **ret_segments, + int *ret_nr_segments) { Elf32_Ehdr elf; Elf32_Phdr *p, *ph; diff --git a/kexec/arch/s390/kexec-elf-rel-s390.c b/kexec/arch/s390/kexec-elf-rel-s390.c index 823b91c..ffa0347 100644 --- a/kexec/arch/s390/kexec-elf-rel-s390.c +++ b/kexec/arch/s390/kexec-elf-rel-s390.c @@ -12,12 +12,15 @@ #include "../../kexec.h" #include "../../kexec-elf.h" -int machine_verify_elf_rel(struct mem_ehdr *ehdr) +int machine_verify_elf_rel(struct mem_ehdr *UNUSED(ehdr)) { return 0; } -void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type, - void *location, unsigned long address, unsigned long value) +void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), + unsigned long UNUSED(r_type), + void *UNUSED(location), + unsigned long UNUSED(address), + unsigned long UNUSED(value)) { } diff --git a/kexec/arch/s390/kexec-image.c b/kexec/arch/s390/kexec-image.c index e1849f0..13e550d 100644 --- a/kexec/arch/s390/kexec-image.c +++ b/kexec/arch/s390/kexec-image.c @@ -119,7 +119,7 @@ image_s390_load(int argc, char **argv, const char *kernel_buf, } int -image_s390_probe(const char *kernel_buf, off_t kernel_size) +image_s390_probe(const char *UNUSED(kernel_buf), off_t UNUSED(kernel_size)) { /* * Can't reliably tell if an image is valid, diff --git a/kexec/arch/s390/kexec-s390.c b/kexec/arch/s390/kexec-s390.c index 15c2837..108ea47 100644 --- a/kexec/arch/s390/kexec-s390.c +++ b/kexec/arch/s390/kexec-s390.c @@ -36,7 +36,8 @@ static struct memory_range memory_range[MAX_MEMORY_RANGES]; * - (-1) if something went wrong. */ -int get_memory_ranges(struct memory_range **range, int *ranges, unsigned long flags) +int get_memory_ranges(struct memory_range **range, int *ranges, + unsigned long UNUSED(flags)) { char sys_ram[] = "System RAM\n"; char *iomem = proc_iomem(); @@ -89,7 +90,7 @@ void arch_usage(void) { } -int arch_process_options(int argc, char **argv) +int arch_process_options(int UNUSED(argc), char **UNUSED(argv)) { return 0; } @@ -100,12 +101,12 @@ const struct arch_map_entry arches[] = { { 0 }, }; -int arch_compat_trampoline(struct kexec_info *info) +int arch_compat_trampoline(struct kexec_info *UNUSED(info)) { return 0; } -void arch_update_purgatory(struct kexec_info *info) +void arch_update_purgatory(struct kexec_info *UNUSED(info)) { } diff --git a/kexec/arch/sh/crashdump-sh.c b/kexec/arch/sh/crashdump-sh.c index e23a5f8..f3c8c74 100644 --- a/kexec/arch/sh/crashdump-sh.c +++ b/kexec/arch/sh/crashdump-sh.c @@ -34,7 +34,7 @@ static struct memory_range crash_memory_range[CRASH_MAX_MEMORY_RANGES]; uint64_t saved_max_mem; static int crash_sh_range_nr; -static int crash_sh_memory_range_callback(void *data, int nr, +static int crash_sh_memory_range_callback(void *UNUSED(data), int UNUSED(nr), char *str, unsigned long base, unsigned long length) diff --git a/kexec/arch/sh/kexec-elf-rel-sh.c b/kexec/arch/sh/kexec-elf-rel-sh.c index c1aaa60..0bfc45e 100644 --- a/kexec/arch/sh/kexec-elf-rel-sh.c +++ b/kexec/arch/sh/kexec-elf-rel-sh.c @@ -28,8 +28,8 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr) return 1; } -void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type, - void *orig_loc, unsigned long address, unsigned long relocation) +void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), unsigned long r_type, + void *orig_loc, unsigned long UNUSED(address), unsigned long relocation) { uint32_t *location = orig_loc; uint32_t value; diff --git a/kexec/arch/sh/kexec-netbsd-sh.c b/kexec/arch/sh/kexec-netbsd-sh.c index a9f57b8..ea67172 100644 --- a/kexec/arch/sh/kexec-netbsd-sh.c +++ b/kexec/arch/sh/kexec-netbsd-sh.c @@ -33,7 +33,7 @@ const extern unsigned char netbsd_booter[]; * * Make sure that the file image has a reasonable chance of working. */ -int netbsd_sh_probe(const char *buf, off_t len) +int netbsd_sh_probe(const char *buf, off_t UNUSED(len)) { Elf32_Ehdr *ehdr; @@ -54,7 +54,7 @@ void netbsd_sh_usage(void) " --miniroot=FILE NetBSD miniroot ramdisk.\n\n"); } -int netbsd_sh_load(int argc, char **argv, const char *buf, off_t len, +int netbsd_sh_load(int argc, char **argv, const char *buf, off_t UNUSED(len), struct kexec_info *info) { const char *howto, *miniroot; diff --git a/kexec/arch/sh/kexec-sh.c b/kexec/arch/sh/kexec-sh.c index d04989d..86bce27 100644 --- a/kexec/arch/sh/kexec-sh.c +++ b/kexec/arch/sh/kexec-sh.c @@ -22,8 +22,8 @@ #define MAX_MEMORY_RANGES 64 static struct memory_range memory_range[MAX_MEMORY_RANGES]; -static int kexec_sh_memory_range_callback(void *data, int nr, - char *str, +static int kexec_sh_memory_range_callback(void *UNUSED(data), int nr, + char *UNUSED(str), unsigned long base, unsigned long length) { @@ -138,12 +138,12 @@ const struct arch_map_entry arches[] = { { 0 }, }; -int arch_compat_trampoline(struct kexec_info *info) +int arch_compat_trampoline(struct kexec_info *UNUSED(info)) { return 0; } -void arch_update_purgatory(struct kexec_info *info) +void arch_update_purgatory(struct kexec_info *UNUSED(info)) { } diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c index 474f31d..8b2e0e5 100644 --- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c +++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c @@ -57,7 +57,7 @@ static const char *reloc_name(unsigned long r_type) return name; } -void machine_apply_elf_rel(struct mem_ehdr *ehdr, unsigned long r_type, +void machine_apply_elf_rel(struct mem_ehdr *UNUSED(ehdr), unsigned long r_type, void *location, unsigned long address, unsigned long value) { #ifdef DEBUG diff --git a/kexec/arch/x86_64/kexec-x86_64.c b/kexec/arch/x86_64/kexec-x86_64.c index 9973815..6003eb8 100644 --- a/kexec/arch/x86_64/kexec-x86_64.c +++ b/kexec/arch/x86_64/kexec-x86_64.c @@ -148,7 +148,7 @@ const struct arch_map_entry arches[] = { { 0 }, }; -int arch_compat_trampoline(struct kexec_info *info) +int arch_compat_trampoline(struct kexec_info *UNUSED(info)) { return 0; } diff --git a/kexec/crashdump-xen.c b/kexec/crashdump-xen.c index a66c21e..23d6b1f 100644 --- a/kexec/crashdump-xen.c +++ b/kexec/crashdump-xen.c @@ -72,8 +72,8 @@ unsigned long xen_architecture(struct crash_elf_info *elf_info) return machine; } -static int xen_crash_note_callback(void *data, int nr, - char *str, +static int xen_crash_note_callback(void *UNUSED(data), int nr, + char *UNUSED(str), unsigned long base, unsigned long length) { diff --git a/kexec/kexec-iomem.c b/kexec/kexec-iomem.c index ddc9f13..0396713 100644 --- a/kexec/kexec-iomem.c +++ b/kexec/kexec-iomem.c @@ -64,7 +64,7 @@ int kexec_iomem_for_each_line(char *match, } static int kexec_iomem_single_callback(void *data, int nr, - char *str, + char *UNUSED(str), unsigned long base, unsigned long length) { diff --git a/kexec/kexec.h b/kexec/kexec.h index 5f00525..63e7bfa 100644 --- a/kexec/kexec.h +++ b/kexec/kexec.h @@ -13,6 +13,7 @@ #define _GNU_SOURCE #include "kexec-elf.h" +#include "unused.h" #ifndef BYTE_ORDER #error BYTE_ORDER not defined @@ -258,7 +259,7 @@ extern int add_backup_segments(struct kexec_info *info, #define dbgprintf(_args...) do {printf(_args);} while(0) #else static inline int __attribute__ ((format (printf, 1, 2))) - dbgprintf(const char *fmt, ...) {return 0;} + dbgprintf(const char *UNUSED(fmt), ...) {return 0;} #endif char *concat_cmdline(const char *base, const char *append); diff --git a/kexec/lzma.c b/kexec/lzma.c index 20bc1ea..43f9290 100644 --- a/kexec/lzma.c +++ b/kexec/lzma.c @@ -3,6 +3,7 @@ #include "kexec-lzma.h" #include "config.h" +#include "kexec.h" #ifdef HAVE_LIBLZMA #define _GNU_SOURCE @@ -16,8 +17,6 @@ #include <ctype.h> #include <lzma.h> -#include "kexec.h" - #define kBufferSize (1 << 15) typedef struct lzfile { @@ -197,7 +196,7 @@ char *lzma_decompress_file(const char *filename, off_t *r_size) return buf; } #else -char *lzma_decompress_file(const char *filename, off_t *r_size) +char *lzma_decompress_file(const char *UNUSED(filename), off_t *UNUSED(r_size)) { return NULL; } diff --git a/kexec/virt_to_phys.c b/kexec/virt_to_phys.c index 51ac1df..a746917 100644 --- a/kexec/virt_to_phys.c +++ b/kexec/virt_to_phys.c @@ -1,7 +1,7 @@ #include "kexec.h" #include <stdlib.h> -unsigned long virt_to_phys(unsigned long addr) +unsigned long virt_to_phys(unsigned long UNUSED(addr)) { abort(); } diff --git a/kexec/zlib.c b/kexec/zlib.c index 3968494..d44df12 100644 --- a/kexec/zlib.c +++ b/kexec/zlib.c @@ -1,4 +1,6 @@ #include "kexec-zlib.h" +#include "kexec.h" + #ifdef HAVE_LIBZ #define _GNU_SOURCE #include <stdio.h> @@ -13,8 +15,6 @@ #include <ctype.h> #include <zlib.h> -#include "kexec.h" - char *zlib_decompress_file(const char *filename, off_t *r_size) { gzFile fp; @@ -71,7 +71,7 @@ char *zlib_decompress_file(const char *filename, off_t *r_size) return buf; } #else -char *zlib_decompress_file(const char *filename, off_t *r_size) +char *zlib_decompress_file(const char *UNUSED(filename), off_t *UNUSED(r_size)) { return NULL; } diff --git a/purgatory/Makefile b/purgatory/Makefile index ceab269..aa3a788 100644 --- a/purgatory/Makefile +++ b/purgatory/Makefile @@ -53,6 +53,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ -I$(srcdir)/purgatory/include \ -I$(srcdir)/purgatory/arch/$(ARCH)/include \ -I$(srcdir)/util_lib/include \ + -I$(srcdir)/include \ -I$(shell $(CC) -print-file-name=include) $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\ --no-undefined -nostartfiles -nostdlib -nodefaultlibs \ diff --git a/purgatory/arch/mips/console-mips.c b/purgatory/arch/mips/console-mips.c index 389b7be..af34ecf 100644 --- a/purgatory/arch/mips/console-mips.c +++ b/purgatory/arch/mips/console-mips.c @@ -1,5 +1,7 @@ #include <purgatory.h> -void putchar(int ch) +#include "unused.h" + +void putchar(int UNUSED(ch)) { /* Nothing for now */ } diff --git a/purgatory/arch/ppc/console-ppc.c b/purgatory/arch/ppc/console-ppc.c index 389b7be..af34ecf 100644 --- a/purgatory/arch/ppc/console-ppc.c +++ b/purgatory/arch/ppc/console-ppc.c @@ -1,5 +1,7 @@ #include <purgatory.h> -void putchar(int ch) +#include "unused.h" + +void putchar(int UNUSED(ch)) { /* Nothing for now */ } |