Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1613004imm; Wed, 23 May 2018 20:40:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpGpJSLZ2BY+btAxol4Uxf63EfDTqs8dR7S/7ZGh+x1mpSrQ9PNHlYR0GonpYKPwREsq+Gh X-Received: by 2002:a63:794d:: with SMTP id u74-v6mr4376630pgc.328.1527133212752; Wed, 23 May 2018 20:40:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527133212; cv=none; d=google.com; s=arc-20160816; b=0NVdzcwpRuwAnGp2OZORYc8jA9h+9e1/OEn6n/rkUvOs7ME6weCXVj8KQCVfff6yVa 7tkRYFap6QG/pa7pohjSfTgG0dHwguu3BX6udNg6oDVgu0KJLrfjJD0/ZjZJ3zwq4qdv aCWeopFCR/a1Ep3SoRJvVZSB69Ssr878cGu3hXPr3cO4cBSNgEBjN1lmWi0m78ily9Lb m+3bTy0K8KGyHgfd6JHM7K8Q37Js1cMDHC1U/0Luu3UXiLjTImaMn0jn97X4p7uoYnB8 xthX6XxcYLA8TTsA6zfrOW93FRwUgFsesDw3MdPhyWTznYd6qjMFBmQRTXgkXp8mSWhb G+lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=bS77XjE0g3efYwVQ0CuYUKcwVI28GxNSQ4QFYJg/2E8=; b=JbxM2ml4p2RrrY4gy3UUR1qvENQwcolm5jICpkGqMy3Ucc/sKpRTUisu7e2azuESHo hN0hWNsihYZFI+SvEZRRfn2Ii5CZ9hWsbngNnIsx+x4jbBl53mutISlR8gTFanRoYtlO cZw2dpX1UER75YzwrLehqmhMglpdHLWFb3i3cQPVBr9af7eiQ983p+ywIXkDQJmcBvzt HZjFBj5VYnKSQBoTtOvqPQfTU/NbhevINuAQIWg/7n4tdwNyfe5pu2uXqS2hPrAZU21r uhKXsji9TfCmUY9c+KxD71wcpPBq6jP28vTyY7v2+A9A2+7zHo83V8yqexCcx43XX4Pq 9+1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12-v6si15650295pgu.115.2018.05.23.20.39.58; Wed, 23 May 2018 20:40:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935447AbeEXDim (ORCPT + 99 others); Wed, 23 May 2018 23:38:42 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:39308 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S935171AbeEXDij (ORCPT ); Wed, 23 May 2018 23:38:39 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 9D3467265E9BF; Thu, 24 May 2018 11:38:36 +0800 (CST) Received: from linux-work.huawei.com (10.67.189.174) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.382.0; Thu, 24 May 2018 11:38:31 +0800 From: nixiaoming To: , , , , , , , CC: , Subject: [PATCH] scripts: Fixed printf format mismatch Date: Thu, 24 May 2018 11:16:12 +0800 Message-ID: <20180524031612.79723-1-nixiaoming@huawei.com> X-Mailer: git-send-email 2.10.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.189.174] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org scripts/kallsyms.c: function write_src: "printf", the #1 format specifier "d" need arg type "int", but the according arg "table_cnt" has type "unsigned int" scripts/recordmcount.c: function do_file: "fprintf", the #1 format specifier "d" need arg type "int", but the according arg "(*w2)(ehdr->e_machine)" has type "unsigned int" scripts/recordmcount.h: function find_secsym_ndx: "fprintf", the #1 format specifier "d" need arg type "int", but the according arg "txtndx" has type "unsigned int" Signed-off-by: nixiaoming --- scripts/kallsyms.c | 2 +- scripts/recordmcount.c | 2 +- scripts/recordmcount.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 5abfbf1..e0c416a 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -424,7 +424,7 @@ static void write_src(void) } output_label("kallsyms_num_syms"); - printf("\tPTR\t%d\n", table_cnt); + printf("\tPTR\t%u\n", table_cnt); printf("\n"); /* table of offset markers, that give the offset in the compressed stream diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index 8c9691c..895c40e 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -500,7 +500,7 @@ do_file(char const *const fname) gpfx = 0; switch (w2(ehdr->e_machine)) { default: - fprintf(stderr, "unrecognized e_machine %d %s\n", + fprintf(stderr, "unrecognized e_machine %u %s\n", w2(ehdr->e_machine), fname); fail_file(); break; diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index b9897e2..2e77937 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h @@ -441,7 +441,7 @@ static unsigned find_secsym_ndx(unsigned const txtndx, return symp - sym0; } } - fprintf(stderr, "Cannot find symbol for section %d: %s.\n", + fprintf(stderr, "Cannot find symbol for section %u: %s.\n", txtndx, txtname); fail_file(); } -- 2.10.1