From 3394701ae17fa6037d9dc3f0da623707988cb02a Mon Sep 17 00:00:00 2001 From: marcel Date: Sun, 18 Dec 2005 01:38:26 +0000 Subject: Explicitly cast ELF_R_TYPE() to the right type. --- libexec/rtld-elf/alpha/reloc.c | 4 ++-- libexec/rtld-elf/amd64/reloc.c | 4 ++-- libexec/rtld-elf/ia64/reloc.c | 4 ++-- usr.sbin/kldxref/ef_sparc64.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libexec/rtld-elf/alpha/reloc.c b/libexec/rtld-elf/alpha/reloc.c index 74aaf9c..e1ed135 100644 --- a/libexec/rtld-elf/alpha/reloc.c +++ b/libexec/rtld-elf/alpha/reloc.c @@ -135,9 +135,9 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, Obj_Entry *obj, const Elf_Rela *rela, break; default: - _rtld_error("%s: Unsupported relocation type %d" + _rtld_error("%s: Unsupported relocation type %u" " in non-PLT relocations\n", obj->path, - ELF_R_TYPE(rela->r_info)); + (unsigned int)ELF_R_TYPE(rela->r_info)); return -1; } return(0); diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c index 985b481..72977d6 100644 --- a/libexec/rtld-elf/amd64/reloc.c +++ b/libexec/rtld-elf/amd64/reloc.c @@ -312,9 +312,9 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) /* missing: R_X86_64_GOTPCREL, R_X86_64_32, R_X86_64_32S, R_X86_64_16, R_X86_64_PC16, R_X86_64_8, R_X86_64_PC8 */ default: - _rtld_error("%s: Unsupported relocation type %d" + _rtld_error("%s: Unsupported relocation type %u" " in non-PLT relocations\n", obj->path, - ELF_R_TYPE(rela->r_info)); + (unsigned int)ELF_R_TYPE(rela->r_info)); goto done; } } diff --git a/libexec/rtld-elf/ia64/reloc.c b/libexec/rtld-elf/ia64/reloc.c index d718293..0c1621a 100644 --- a/libexec/rtld-elf/ia64/reloc.c +++ b/libexec/rtld-elf/ia64/reloc.c @@ -318,9 +318,9 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, Obj_Entry *obj, const Elf_Rela *rela, break; default: - _rtld_error("%s: Unsupported relocation type %d" + _rtld_error("%s: Unsupported relocation type %u" " in non-PLT relocations\n", obj->path, - ELF_R_TYPE(rela->r_info)); + (unsigned int)ELF_R_TYPE(rela->r_info)); return -1; } diff --git a/usr.sbin/kldxref/ef_sparc64.c b/usr.sbin/kldxref/ef_sparc64.c index e5133f1..dae6488 100644 --- a/usr.sbin/kldxref/ef_sparc64.c +++ b/usr.sbin/kldxref/ef_sparc64.c @@ -59,7 +59,7 @@ ef_reloc(struct elf_file *ef, const void *reldata, int reltype, Elf_Off relbase, break; default: warnx("unhandled relocation type %u", - ELF_R_TYPE(a->r_info)); + (unsigned int)ELF_R_TYPE(a->r_info)); break; } } -- cgit v1.1