Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

nixiaoming and committed by
Masahiro Yamada
ac5db1fc 656c1077

+3 -3
+1 -1
scripts/kallsyms.c
··· 405 405 } 406 406 407 407 output_label("kallsyms_num_syms"); 408 - printf("\tPTR\t%d\n", table_cnt); 408 + printf("\tPTR\t%u\n", table_cnt); 409 409 printf("\n"); 410 410 411 411 /* table of offset markers, that give the offset in the compressed stream
+1 -1
scripts/recordmcount.c
··· 500 500 gpfx = 0; 501 501 switch (w2(ehdr->e_machine)) { 502 502 default: 503 - fprintf(stderr, "unrecognized e_machine %d %s\n", 503 + fprintf(stderr, "unrecognized e_machine %u %s\n", 504 504 w2(ehdr->e_machine), fname); 505 505 fail_file(); 506 506 break;
+1 -1
scripts/recordmcount.h
··· 441 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 445 txtndx, txtname); 446 446 fail_file(); 447 447 }