scripts: sortextable: change type and initialise variable
PATCH 1/1 scripts: sortextable: change type and initialise variable
Change the type of 'relocs_size' from 'int' to 'Elf32_Word' and initialize it to 0, to fix the "maybe uninitialised variable" compiler warning.
Signed-off-by Klemen Jan Enova <[email protected]>
---
scripts/sortextable.h +1 -1
@@ -103,7 +103,7 @@ do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_Elf_Sym *sort_needed_sym;Elf_Shdr *sort_needed_sec;Elf_Rel *relocs =NULL ; -int relocs_size; +Elf32_Word relocs_size =0 ;uint32_t *sort_done_location;const char *secstrtab;const char *strtab;
Quoted 3 lines · Klemen Jan Enova
Change the type of '
relocs_size' from 'int' to 'Elf32_Word' and initialize it to 0, to fix the "maybe uninitialised variable" compiler warning.
Please include the verbatim warning in the commit message.
Quoted 8 lines
Signed-off-by Klemen Jan Enova <[email protected]>---
scripts/sortextable.h +0
-0@@ -103,7 +103,7 @@ do_func(Elf_Ehdr *ehdr, char const *const fname,
table_sort_
Your mailer corrupted the patch by inserting a line break here.
scripts/sortextable.h do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_ · line 106
Quoted 5 lines
Elf_Sym *sort_needed_sym; Elf_Shdr *sort_needed_sec; Elf_Rel *relocs = NULL;scripts/sortextable.h +1
-1-int relocs_size; +Elf32_Word relocs_size =0 ;
... and changed tabs to spaces. Please send the patch to yourself first and see if it applies with 'git am.'
Michal