diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2014-10-13 18:54:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-13 20:18:23 -0400 |
commit | 7cbc0ea79da2cbe70d8da9319895f07f872a3190 (patch) | |
tree | bb10d04f30a0161260b274c7bd5e6eb416a32ddf | |
parent | f9a4d1103c1c4b9fa5b23b1ddc2666f015822ef2 (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
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Reviewed-by: Jamie Iles <jamie.iles@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-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 8fac3fd697a6..ba8700428e21 100644 --- a/scripts/sortextable.h +++ b/scripts/sortextable.h | |||
@@ -103,7 +103,7 @@ do_func(Elf_Ehdr *ehdr, char const *const fname, table_sort_t custom_sort) | |||
103 | Elf_Sym *sort_needed_sym; | 103 | Elf_Sym *sort_needed_sym; |
104 | Elf_Shdr *sort_needed_sec; | 104 | Elf_Shdr *sort_needed_sec; |
105 | Elf_Rel *relocs = NULL; | 105 | Elf_Rel *relocs = NULL; |
106 | int relocs_size; | 106 | int relocs_size = 0; |
107 | uint32_t *sort_done_location; | 107 | uint32_t *sort_done_location; |
108 | const char *secstrtab; | 108 | const char *secstrtab; |
109 | const char *strtab; | 109 | const char *strtab; |