From: Wenle Chen <solomonwen@163.com>
To: chenwenle@huawei.com
Cc: jhogan@kernel.org, linux@roeck-us.net, rostedt@goodmis.org,
peterz@infradead.org, linux-kernel@vger.kernel.org,
solachenclever@hotmail.com, solomonwen@163.com
Subject: [PATCH] scripts : sync the var type between memory and print
Date: Sat, 7 Apr 2018 18:01:35 +0800 [thread overview]
Message-ID: <1523095295-5575-1-git-send-email-solomonwen@163.com> (raw)
From: Wenle Chen <chenwenle@huawei.com>
The %d in printf need get a int
But the real type of these vars is unsigned.
It may let some compilers show a warning.
Signed-off-by: Wenle Chen <chenwenle@huawei.com>
---
scripts/recordmcount.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
index 8c9691c..6f900fa 100644
--- a/scripts/recordmcount.c
+++ b/scripts/recordmcount.c
@@ -459,7 +459,7 @@ do_file(char const *const fname)
switch (ehdr->e_ident[EI_DATA]) {
static unsigned int const endian = 1;
default:
- fprintf(stderr, "unrecognized ELF data encoding %d: %s\n",
+ fprintf(stderr, "unrecognized ELF data encoding %u: %s\n",
ehdr->e_ident[EI_DATA], fname);
fail_file();
break;
@@ -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;
@@ -541,7 +541,7 @@ do_file(char const *const fname)
switch (ehdr->e_ident[EI_CLASS]) {
default:
- fprintf(stderr, "unrecognized ELF class %d %s\n",
+ fprintf(stderr, "unrecognized ELF class %u %s\n",
ehdr->e_ident[EI_CLASS], fname);
fail_file();
break;
--
2.7.4
next reply other threads:[~2018-04-07 10:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-07 10:01 Wenle Chen [this message]
2018-04-07 22:36 ` Steven Rostedt
2018-04-17 12:41 Wenle Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1523095295-5575-1-git-send-email-solomonwen@163.com \
--to=solomonwen@163.com \
--cc=chenwenle@huawei.com \
--cc=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=solachenclever@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®