]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/config/tc-epiphany.c
gas warning fixes
authorAlan Modra <amodra@gmail.com>
Tue, 25 Aug 2020 00:27:58 +0000 (09:57 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 25 Aug 2020 13:36:50 +0000 (23:06 +0930)
commitca159256b4eb2c3bf245aef7f05a24fcc1ca6d9b
treeeb731a8d41fb0dd2565ab02a2ffe3fafd9cb2cb9
parent8d3035466746825cd5909cf045cf841222989ec6
gas warning fixes

Some versions of gcc with -Werror=format-overflow complain about using
a perfectly good 7 char buffer for "r%dr%d" when the int is between 0
and 64, apparently not seeing the value range.

note: __builtin___sprintf_chk output between 5 and 24 bytes into a destination of size 7

* config/tc-arc.c (declare_register_set): Avoid false positive
format-overflow warning.
* config/tc-epiphany.c (md_assemble): Likewise.
* config/tc-mips.c (md_begin): Likewise.
* config/tc-mmix.c (mmix_md_begin): Likewise.
* config/tc-nds32.c (nds32_elf_append_relax_relocs): Avoid false
positive "may be used uninitialized" warning.
gas/ChangeLog
gas/config/tc-arc.c
gas/config/tc-epiphany.c
gas/config/tc-mips.c
gas/config/tc-mmix.c
gas/config/tc-nds32.c