diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-30 14:31:15 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-09-30 14:31:15 +0930 |
commit | e37c930f9e4ad20901493608f276011999efdf8f (patch) | |
tree | d1fcb4cb37bde1bc524af2c3cc479c77cdff0014 | |
parent | 529908cbd0afc2524044b7df3626c09d0bdae12d (diff) | |
download | gdb-e37c930f9e4ad20901493608f276011999efdf8f.zip gdb-e37c930f9e4ad20901493608f276011999efdf8f.tar.gz gdb-e37c930f9e4ad20901493608f276011999efdf8f.tar.bz2 |
gcc-4.4.7 warning fixes
* config/obj-elf.c (obj_elf_change_section): Rename variable to
avoid shadowing warning.
* symbols.c (symbol_entry_find): Init all symbol_flags fields.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/obj-elf.c | 4 | ||||
-rw-r--r-- | gas/symbols.c | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 9e03df2..056097e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2020-09-30 Alan Modra <amodra@gmail.com> + + * config/obj-elf.c (obj_elf_change_section): Rename variable to + avoid shadowing warning. + * symbols.c (symbol_entry_find): Init all symbol_flags fields. + 2020-09-29 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com> * NEWS: TRBE, ETE, ETMv4 and Cortex-X1 news updates. diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index b1c9902..cd457ab 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -762,8 +762,8 @@ obj_elf_change_section (const char *name, /* We could be repurposing an undefined symbol here: make sure we reset sy_value to look like other section symbols in order to avoid trying to incorrectly resolve this section symbol later on. */ - static const expressionS expr = { .X_op = O_constant }; - symbol_set_value_expression (secsym, &expr); + static const expressionS exp = { .X_op = O_constant }; + symbol_set_value_expression (secsym, &exp); symbol_set_bfdsym (secsym, sec->symbol); } else diff --git a/gas/symbols.c b/gas/symbols.c index d608088..26dd84b 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -196,7 +196,8 @@ static void * symbol_entry_find (htab_t table, const char *name) { hashval_t hash = htab_hash_string (name); - symbol_entry_t needle = { { { 0 }, hash, name, 0, 0, 0 } }; + symbol_entry_t needle = { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + hash, name, 0, 0, 0 } }; return htab_find_with_hash (table, &needle, hash); } |