diff options
author | Nick Clifton <nickc@redhat.com> | 2017-02-03 09:04:21 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-02-03 09:04:21 +0000 |
commit | 1b7e3d2fb7036ce6f9d74e32dc052518f5cd45b6 (patch) | |
tree | c688cc3b7f56099d9e92a92af400fd1cbccf920b /bfd/elf32-nds32.c | |
parent | 65c40c956fcd9443a5390d6cc36f84bd1bf77df4 (diff) | |
download | binutils-gdb-1b7e3d2fb7036ce6f9d74e32dc052518f5cd45b6.tar.gz |
Fix compile time warning messages when compiling binutils with gcc 7.0.1.
PR 21096
bfd * coffcode.h (coff_write_object_contents): Enlarge size of
s_name_buf in order to avoid compile time warning about possible
integer truncation.
* elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
32-bits of insn value before printing into buffer.
opcodes * aarch64-opc.c (print_register_list): Ensure that the register
list index will fir into the tb buffer.
(print_register_offset_address): Likewise.
* tic6x-dis.c (print_insn_tic6x): Increase size of func_unit_buf.
Diffstat (limited to 'bfd/elf32-nds32.c')
-rw-r--r-- | bfd/elf32-nds32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index a84a6fd78a1..3d510a0d545 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -14949,7 +14949,6 @@ nds32_elf_ex9_import_table (struct bfd_link_info *info) { int num = 0; bfd_byte *contents; - unsigned long insn; FILE *ex9_import_file; int update_ex9_table; struct elf_nds32_link_hash_table *table; @@ -14963,6 +14962,7 @@ nds32_elf_ex9_import_table (struct bfd_link_info *info) /* Read instructions from the input file and build the list. */ while (!feof (ex9_import_file)) { + unsigned long insn; char *code; struct elf_nds32_insn_times_entry *ptr; size_t nread; @@ -14973,7 +14973,7 @@ nds32_elf_ex9_import_table (struct bfd_link_info *info) break; insn = bfd_getb32 (contents); code = bfd_malloc (sizeof (char) * 9); - snprintf (code, 9, "%08lx", insn); + snprintf (code, 9, "%08lx", (insn & 0xffffffff)); ptr = bfd_malloc (sizeof (struct elf_nds32_insn_times_entry)); ptr->string = code; ptr->order = num; |