diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2014-10-13 15:54:20 -0700 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2015-06-12 12:50:47 +0100 |
commit | 2b12afabf1bf20bdb7c5e0fee3a8cb217397e767 (patch) | |
tree | cf9a46320885e614fd3f459a55b3675c1f315402 /scripts/sortextable.h | |
parent | ab9ebbacb04b9f54a709cc06a6903680dd7a2dd7 (diff) | |
download | linux-stable-2b12afabf1bf20bdb7c5e0fee3a8cb217397e767.tar.gz linux-stable-2b12afabf1bf20bdb7c5e0fee3a8cb217397e767.tar.bz2 linux-stable-2b12afabf1bf20bdb7c5e0fee3a8cb217397e767.zip |
scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized
commit 7cbc0ea79da2cbe70d8da9319895f07f872a3190 upstream.
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>
Cc: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'scripts/sortextable.h')
-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) 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; |