diff options
| author | Tim Gardner <tim.gardner@canonical.com> | 2015-11-24 09:04:15 +0100 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 11:00:29 +0200 |
| commit | a90020ad9bb5491db01bf9921dccaff8a63bf8e1 (patch) | |
| tree | 16983f13935b72791cf6b5ff9b137f0a40575f74 /scripts | |
| parent | d0c9b3a66a5a0ebf2f386153f3a64644055a89e0 (diff) | |
scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized
In file included from scripts/sortextable.c:194:0:
scripts/sortextable.c: In function `main':
scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
memset(relocs, 0, relocs_size);
^
scripts/sortextable.h:106:6: note: `relocs_size' was declared here
int relocs_size;
^
In file included from scripts/sortextable.c:192:0:
scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
memset(relocs, 0, relocs_size);
^
scripts/sortextable.h:106:6: note: `relocs_size' was declared here
int relocs_size;
^
gcc 4.9.1
Change-Id: I277a20929ab23d0c8d073929ac2a70da97e816f2
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/sortextable.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/sortextable.h b/scripts/sortextable.h index f5eb43d42..3f064799a 100644 --- a/scripts/sortextable.h +++ b/scripts/sortextable.h @@ -101,7 +101,7 @@ do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_t custom_sort) Elf_Sym *sort_needed_sym; Elf_Shdr *sort_needed_sec; Elf_Rel *relocs = NULL; - int relocs_size; + int relocs_size = 0; uint32_t *sort_done_location; const char *secstrtab; const char *strtab; |
