LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] scripts : sync the var type between memory and print
@ 2018-04-17 12:41 Wenle Chen
0 siblings, 0 replies; 3+ messages in thread
From: Wenle Chen @ 2018-04-17 12:41 UTC (permalink / raw)
To: chenwenle
Cc: jhogan, linux, rostedt, peterz, linux-kernel, solachenclever, solomonwen
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts : sync the var type between memory and print
2018-04-07 10:01 Wenle Chen
@ 2018-04-07 22:36 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2018-04-07 22:36 UTC (permalink / raw)
To: Wenle Chen; +Cc: chenwenle, jhogan, linux, peterz, linux-kernel, solachenclever
On Sat, 7 Apr 2018 18:01:35 +0800
Wenle Chen <solomonwen@163.com> wrote:
> 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.
Thanks but the merge window is currently open. It's best to not send
patches during it. Please send this again after 4.17-rc1 is released.
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] scripts : sync the var type between memory and print
@ 2018-04-07 10:01 Wenle Chen
2018-04-07 22:36 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Wenle Chen @ 2018-04-07 10:01 UTC (permalink / raw)
To: chenwenle
Cc: jhogan, linux, rostedt, peterz, linux-kernel, solachenclever, solomonwen
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-17 12:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-17 12:41 [PATCH] scripts : sync the var type between memory and print Wenle Chen
-- strict thread matches above, loose matches on Subject: below --
2018-04-07 10:01 Wenle Chen
2018-04-07 22:36 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).