diff options
author | nixiaoming <nixiaoming@huawei.com> | 2018-05-23 23:16:12 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-05-29 09:04:12 -0400 |
commit | ac5db1fc89bf84d7479761e0de855e6376fdab1e (patch) | |
tree | d3a9bb19679045dbe78fdd9c5d7b750d1bd3af45 /scripts | |
parent | 656c107770e37759d0e888a1c38cd28792ca214b (diff) |
scripts: Fixed printf format mismatch
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 <nixiaoming@huawei.com>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kallsyms.c | 2 | ||||
-rw-r--r-- | scripts/recordmcount.c | 2 | ||||
-rw-r--r-- | scripts/recordmcount.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 80417629b246..a9186a98a37d 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c | |||
@@ -405,7 +405,7 @@ static void write_src(void) | |||
405 | } | 405 | } |
406 | 406 | ||
407 | output_label("kallsyms_num_syms"); | 407 | output_label("kallsyms_num_syms"); |
408 | printf("\tPTR\t%d\n", table_cnt); | 408 | printf("\tPTR\t%u\n", table_cnt); |
409 | printf("\n"); | 409 | printf("\n"); |
410 | 410 | ||
411 | /* table of offset markers, that give the offset in the compressed stream | 411 | /* table of offset markers, that give the offset in the compressed stream |
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index 8c9691c3329e..895c40e8679f 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c | |||
@@ -500,7 +500,7 @@ do_file(char const *const fname) | |||
500 | gpfx = 0; | 500 | gpfx = 0; |
501 | switch (w2(ehdr->e_machine)) { | 501 | switch (w2(ehdr->e_machine)) { |
502 | default: | 502 | default: |
503 | fprintf(stderr, "unrecognized e_machine %d %s\n", | 503 | fprintf(stderr, "unrecognized e_machine %u %s\n", |
504 | w2(ehdr->e_machine), fname); | 504 | w2(ehdr->e_machine), fname); |
505 | fail_file(); | 505 | fail_file(); |
506 | break; | 506 | break; |
diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h index b9897e2be404..2e7793735e14 100644 --- a/scripts/recordmcount.h +++ b/scripts/recordmcount.h | |||
@@ -441,7 +441,7 @@ static unsigned find_secsym_ndx(unsigned const txtndx, | |||
441 | return symp - sym0; | 441 | return symp - sym0; |
442 | } | 442 | } |
443 | } | 443 | } |
444 | fprintf(stderr, "Cannot find symbol for section %d: %s.\n", | 444 | fprintf(stderr, "Cannot find symbol for section %u: %s.\n", |
445 | txtndx, txtname); | 445 | txtndx, txtname); |
446 | fail_file(); | 446 | fail_file(); |
447 | } | 447 | } |