aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-07-12 12:17:02 +0100
committerNick Clifton <nickc@redhat.com>2017-07-12 12:17:02 +0100
commit0bae9e9ec550c940e263b37f577bf11b2dabf934 (patch)
tree82c27756b67646e785e85fa9935d3ef4a87ac1b6 /binutils
parent2fe40b6792e98dfe27e4521b2b33fe0f335ea1f0 (diff)
downloadfsf-binutils-gdb-0bae9e9ec550c940e263b37f577bf11b2dabf934.zip
fsf-binutils-gdb-0bae9e9ec550c940e263b37f577bf11b2dabf934.tar.gz
fsf-binutils-gdb-0bae9e9ec550c940e263b37f577bf11b2dabf934.tar.bz2
Fix compile time warnings building the binutils with gcc 7.1.1.
bfd * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of plt_name buffer. (elf_xtensa_get_gotplt_section): Increase length of got_name buffer. * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a default return of FALSE. * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a default return of FALSE. binutils * dwarf.c (dwarf_vmatoa_1): Do not pass a NULL string pointer to sprintf. * srconv.c (walk_tree_type): Initialise the spare field of the IT_dty structure. gas * config/tc-pru.c (md_assemble): Add continue statement after handling 'E' operand character. * config/tc-v850.c (md_assemble): Initialise the 'insn' variable.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog8
-rw-r--r--binutils/dwarf.c5
-rw-r--r--binutils/srconv.c15
3 files changed, 18 insertions, 10 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 254be5e..1a9c39f 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,11 @@
+2017-07-12 Nick Clifton <nickc@redhat.com>
+
+ Fix compile time warnings using gcc 7.1.1.
+ * dwarf.c (dwarf_vmatoa_1): Do not pass a NULL string pointer to
+ sprintf.
+ * srconv.c (walk_tree_type): Initialise the spare field of the
+ IT_dty structure.
+
2017-07-11 Andreas Schwab <schwab@suse.de>
* readelf.c (process_note): Print newline after description data
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 386cc17..5f8922e 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -217,7 +217,10 @@ dwarf_vmatoa_1 (const char *fmtch, dwarf_vma value, unsigned num_bytes)
{
char fmt[32];
- sprintf (fmt, "%%%s%s", DWARF_VMA_FMT, fmtch);
+ if (fmtch)
+ sprintf (fmt, "%%%s%s", DWARF_VMA_FMT, fmtch);
+ else
+ sprintf (fmt, "%%%s", DWARF_VMA_FMT);
snprintf (ret, sizeof (buf[0].place), fmt, value);
return ret;
}
diff --git a/binutils/srconv.c b/binutils/srconv.c
index 87c503d..a033bc8 100644
--- a/binutils/srconv.c
+++ b/binutils/srconv.c
@@ -874,13 +874,14 @@ static void
walk_tree_type (struct coff_sfile *sfile, struct coff_symbol *symbol,
struct coff_type *type, int nest)
{
- if (symbol->type->type == coff_function_type)
- {
- struct IT_dty dty;
+ struct IT_dty dty;
- dty.end = 0;
- dty.neg = 0x1001;
+ dty.spare = 0;
+ dty.end = 0;
+ dty.neg = 0x1001;
+ if (symbol->type->type == coff_function_type)
+ {
sysroff_swap_dty_out (file, &dty);
walk_tree_type_1 (sfile, symbol, type, nest);
dty.end = 1;
@@ -906,10 +907,6 @@ walk_tree_type (struct coff_sfile *sfile, struct coff_symbol *symbol,
}
else
{
- struct IT_dty dty;
-
- dty.end = 0;
- dty.neg = 0x1001;
sysroff_swap_dty_out (file, &dty);
walk_tree_type_1 (sfile, symbol, type, nest);
dty.end = 1;