forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user