Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756313AbXKVCoo (ORCPT ); Wed, 21 Nov 2007 21:44:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752081AbXKVCnT (ORCPT ); Wed, 21 Nov 2007 21:43:19 -0500 Received: from ns1.suse.de ([195.135.220.2]:58875 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751153AbXKVCnK (ORCPT ); Wed, 21 Nov 2007 21:43:10 -0500 From: Andi Kleen References: <20071122343.446909000@suse.de> In-Reply-To: <20071122343.446909000@suse.de> To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sam@ravnborg.org, rusty@rustcorp.com.au Subject: [PATCH RFC] [4/9] modpost: Fix format string warnings Message-Id: <20071122024309.AD8E314D68@wotan.suse.de> Date: Thu, 22 Nov 2007 03:43:09 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1971 Lines: 45 Fix wrong format strings in modpost exposed by the previous patch. Including one missing argument -- some random data was printed instead. --- scripts/mod/modpost.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) Index: linux/scripts/mod/modpost.c =================================================================== --- linux.orig/scripts/mod/modpost.c +++ linux/scripts/mod/modpost.c @@ -388,7 +388,7 @@ static int parse_elf(struct elf_info *in /* Check if file offset is correct */ if (hdr->e_shoff > info->size) { - fatal("section header offset=%u in file '%s' is bigger then filesize=%lu\n", hdr->e_shoff, filename, info->size); + fatal("section header offset=%lu in file '%s' is bigger then filesize=%lu\n", (unsigned long)hdr->e_shoff, filename, info->size); return 0; } @@ -409,7 +409,7 @@ static int parse_elf(struct elf_info *in const char *secname; if (sechdrs[i].sh_offset > info->size) { - fatal("%s is truncated. sechdrs[i].sh_offset=%u > sizeof(*hrd)=%ul\n", filename, (unsigned int)sechdrs[i].sh_offset, sizeof(*hdr)); + fatal("%s is truncated. sechdrs[i].sh_offset=%lu > sizeof(*hrd)=%lu\n", filename, (unsigned long)sechdrs[i].sh_offset, sizeof(*hdr)); return 0; } secname = secstrings + sechdrs[i].sh_name; @@ -907,7 +907,8 @@ static void warn_sec_mismatch(const char "before '%s' (at offset -0x%llx)\n", modname, fromsec, (unsigned long long)r.r_offset, secname, refsymname, - elf->strtab + after->st_name); + elf->strtab + after->st_name, + (unsigned long long)r.r_offset); } else { warn("%s(%s+0x%llx): Section mismatch: reference to %s:%s\n", modname, fromsec, (unsigned long long)r.r_offset, - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/