aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mmix.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-08-25 09:57:58 +0930
committerAlan Modra <amodra@gmail.com>2020-08-25 23:06:50 +0930
commitca159256b4eb2c3bf245aef7f05a24fcc1ca6d9b (patch)
treeeb731a8d41fb0dd2565ab02a2ffe3fafd9cb2cb9 /gas/config/tc-mmix.c
parent8d3035466746825cd5909cf045cf841222989ec6 (diff)
downloadgdb-ca159256b4eb2c3bf245aef7f05a24fcc1ca6d9b.zip
gdb-ca159256b4eb2c3bf245aef7f05a24fcc1ca6d9b.tar.gz
gdb-ca159256b4eb2c3bf245aef7f05a24fcc1ca6d9b.tar.bz2
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.
Diffstat (limited to 'gas/config/tc-mmix.c')
-rw-r--r--gas/config/tc-mmix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/config/tc-mmix.c b/gas/config/tc-mmix.c
index c469a62..82a9f83 100644
--- a/gas/config/tc-mmix.c
+++ b/gas/config/tc-mmix.c
@@ -780,7 +780,7 @@ mmix_md_begin (void)
/* We always insert the ordinary registers 0..255 as registers. */
for (i = 0; i < 256; i++)
{
- char buf[5];
+ char buf[16];
/* Alternatively, we could diddle with '$' and the following number,
but keeping the registers as symbols helps keep parsing simple. */