[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/21096] New: gcc7 warnings
From: |
dilyan.palauzov at aegee dot org |
Subject: |
[Bug binutils/21096] New: gcc7 warnings |
Date: |
Tue, 31 Jan 2017 17:50:36 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=21096
Bug ID: 21096
Summary: gcc7 warnings
Product: binutils
Version: 2.29 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: dilyan.palauzov at aegee dot org
Target Milestone: ---
When I compile bingutils-gdb with gcc7 I get the following warnings:
In file included from /git/binutils-gdb/bfd/coff-i386.c:614:0,
from /git/binutils-gdb/bfd/pei-i386.c:45:
/git/binutils-gdb/bfd/coffcode.h: In function ‘coff_write_object_contents’:
/git/binutils-gdb/bfd/coffcode.h:3775:46: error: ‘%lu’ directive output may be
truncated writing between 1 and 20 bytes into a region of size 8
[-Werror=format-truncation=]
snprintf (s_name_buf, SCNNMLEN + 1, "/%lu", (unsigned long)
string_size);
^~~
/git/binutils-gdb/bfd/coffcode.h:3775:44: note: directive argument in the range
[4, 18446744073709551614]
snprintf (s_name_buf, SCNNMLEN + 1, "/%lu", (unsigned long)
string_size);
^~~~~~
/git/binutils-gdb/bfd/coffcode.h:3775:8: note: format output between 3 and 22
bytes into a destination of size 9
snprintf (s_name_buf, SCNNMLEN + 1, "/%lu", (unsigned long)
string_size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:1688: pei-i386.lo] Error 1
/git/binutils-gdb/bfd/elf32-nds32.c: In function ‘nds32_elf_pick_relax’:
/git/binutils-gdb/bfd/elf32-nds32.c:14976:27: error: ‘%08lx’ directive output
may be truncated writing between 8 and 16 bytes into a region of size 9
[-Werror=format-truncation=]
snprintf (code, 9, "%08lx", insn);
^~~~~
/git/binutils-gdb/bfd/elf32-nds32.c:14976:26: note: using the range [1,
18446744073709551615] for directive argument
snprintf (code, 9, "%08lx", insn);
^~~~~~~
/git/binutils-gdb/bfd/elf32-nds32.c:14976:7: note: format output between 9 and
17 bytes into a destination of size 9
snprintf (code, 9, "%08lx", insn);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:1688: elf32-nds32.lo] Error 1
/git/binutils-gdb/opcodes/aarch64-opc.c: In function
‘print_register_offset_address’:
/git/binutils-gdb/opcodes/aarch64-opc.c:2967:29: error: ‘%li’ directive output
may be truncated writing between 1 and 20 bytes into a region of size 12
[-Werror=format-truncation=]
snprintf (tb, sizeof (tb), ", %s #%" PRIi64, shift_name,
^~~~~~~~~
/git/binutils-gdb/opcodes/aarch64-opc.c:2967:36: note: format string is defined
here
snprintf (tb, sizeof (tb), ", %s #%" PRIi64, shift_name,
/git/binutils-gdb/opcodes/aarch64-opc.c:2967:29: note: using the range [1,
-9223372036854775808] for directive argument
snprintf (tb, sizeof (tb), ", %s #%" PRIi64, shift_name,
^~~~~~~~~
/git/binutils-gdb/opcodes/aarch64-opc.c:2967:2: note: format output between 6
and 25 bytes into a destination of size 16
snprintf (tb, sizeof (tb), ", %s #%" PRIi64, shift_name,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
opnd->shifter.amount);
~~~~~~~~~~~~~~~~~~~~~
/git/binutils-gdb/opcodes/aarch64-opc.c: In function ‘print_register_list’:
/git/binutils-gdb/opcodes/aarch64-opc.c:2868:22: error: ‘%li’ directive output
may be truncated writing between 1 and 20 bytes into a region of size 7
[-Werror=format-truncation=]
snprintf (tb, 8, "[%" PRIi64 "]", opnd->reglist.index);
^~~~
/git/binutils-gdb/opcodes/aarch64-opc.c:2868:24: note: format string is defined
here
snprintf (tb, 8, "[%" PRIi64 "]", opnd->reglist.index);
/git/binutils-gdb/opcodes/aarch64-opc.c:2868:22: note: using the range [1,
-9223372036854775808] for directive argument
snprintf (tb, 8, "[%" PRIi64 "]", opnd->reglist.index);
^~~~
/git/binutils-gdb/opcodes/aarch64-opc.c:2868:5: note: format output between 4
and 23 bytes into a destination of size 8
snprintf (tb, 8, "[%" PRIi64 "]", opnd->reglist.index);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:1003: aarch64-opc.lo] Error 1
make[1]: *** [Makefile:1046: all-recursive] Error 1
make: *** [Makefile:693: all] Error 2
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/21096] New: gcc7 warnings,
dilyan.palauzov at aegee dot org <=