[binutils-gdb] gcc-4.4.7 warning fixes
Alan Modra
amodra@sourceware.org
Wed Sep 30 06:13:10 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e37c930f9e4ad20901493608f276011999efdf8f
commit e37c930f9e4ad20901493608f276011999efdf8f
Author: Alan Modra <amodra@gmail.com>
Date: Wed Sep 30 14:31:15 2020 +0930
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.
Diff:
---
gas/ChangeLog | 6 ++++++
gas/config/obj-elf.c | 4 ++--
gas/symbols.c | 3 ++-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 9e03df266ff..056097eb71c 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 b1c99020a32..cd457abe5eb 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 d6080886be8..26dd84b126e 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);
}
More information about the Binutils-cvs
mailing list