diff options
author | Andi Kleen <ak@suse.de> | 2007-11-21 21:43:09 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2008-01-28 17:14:36 -0500 |
commit | 58b7a68de37face98afe7c705391145795a982b5 (patch) | |
tree | 9a59293b6b267f248228459082c695d3757542aa /scripts | |
parent | 6d9a89ea4b06146d29e1ffb4d6fded286fa07d29 (diff) |
kbuild: fix format string warnings in modpost
Fix wrong format strings in modpost exposed by the previous patch.
Including one missing argument -- some random data was printed instead.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/modpost.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 3a12c22cc2f8..404ee0d0aac6 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -388,7 +388,7 @@ static int parse_elf(struct elf_info *info, const char *filename) | |||
388 | 388 | ||
389 | /* Check if file offset is correct */ | 389 | /* Check if file offset is correct */ |
390 | if (hdr->e_shoff > info->size) { | 390 | if (hdr->e_shoff > info->size) { |
391 | fatal("section header offset=%u in file '%s' is bigger then filesize=%lu\n", hdr->e_shoff, filename, info->size); | 391 | fatal("section header offset=%lu in file '%s' is bigger then filesize=%lu\n", (unsigned long)hdr->e_shoff, filename, info->size); |
392 | return 0; | 392 | return 0; |
393 | } | 393 | } |
394 | 394 | ||
@@ -409,7 +409,7 @@ static int parse_elf(struct elf_info *info, const char *filename) | |||
409 | const char *secname; | 409 | const char *secname; |
410 | 410 | ||
411 | if (sechdrs[i].sh_offset > info->size) { | 411 | if (sechdrs[i].sh_offset > info->size) { |
412 | fatal("%s is truncated. sechdrs[i].sh_offset=%u > sizeof(*hrd)=%ul\n", filename, (unsigned int)sechdrs[i].sh_offset, sizeof(*hdr)); | 412 | fatal("%s is truncated. sechdrs[i].sh_offset=%lu > sizeof(*hrd)=%lu\n", filename, (unsigned long)sechdrs[i].sh_offset, sizeof(*hdr)); |
413 | return 0; | 413 | return 0; |
414 | } | 414 | } |
415 | secname = secstrings + sechdrs[i].sh_name; | 415 | secname = secstrings + sechdrs[i].sh_name; |
@@ -907,7 +907,8 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec, | |||
907 | "before '%s' (at offset -0x%llx)\n", | 907 | "before '%s' (at offset -0x%llx)\n", |
908 | modname, fromsec, (unsigned long long)r.r_offset, | 908 | modname, fromsec, (unsigned long long)r.r_offset, |
909 | secname, refsymname, | 909 | secname, refsymname, |
910 | elf->strtab + after->st_name); | 910 | elf->strtab + after->st_name, |
911 | (unsigned long long)r.r_offset); | ||
911 | } else { | 912 | } else { |
912 | warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s\n", | 913 | warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s\n", |
913 | modname, fromsec, (unsigned long long)r.r_offset, | 914 | modname, fromsec, (unsigned long long)r.r_offset, |