aboutsummaryrefslogtreecommitdiff
path: root/opcodes/aarch64-opc.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2016-03-24 22:42:09 +0100
committerJan Kratochvil <jan.kratochvil@redhat.com>2016-03-24 22:42:09 +0100
commit0d2f91fe2d5ea93dc3dc76780e6ec2e27d022d39 (patch)
tree50438dc3eb17b75889544974c8ed09842010256e /opcodes/aarch64-opc.c
parentf65c3d1b26e05f445d976aabd48d4b1264c182bc (diff)
downloadgdb-0d2f91fe2d5ea93dc3dc76780e6ec2e27d022d39.zip
gdb-0d2f91fe2d5ea93dc3dc76780e6ec2e27d022d39.tar.gz
gdb-0d2f91fe2d5ea93dc3dc76780e6ec2e27d022d39.tar.bz2
More -Wstack-usage warnings: opcodes/aarch64-*
opcodes Fix -Wstack-usage warnings. * aarch64-dis.c (print_operands): Substitute size. * aarch64-opc.c (print_register_offset_address): Substitute tblen.
Diffstat (limited to 'opcodes/aarch64-opc.c')
-rw-r--r--opcodes/aarch64-opc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index ae06ee3..76992df 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -2301,8 +2301,7 @@ static void
print_register_offset_address (char *buf, size_t size,
const aarch64_opnd_info *opnd)
{
- const size_t tblen = 16;
- char tb[tblen]; /* Temporary buffer. */
+ char tb[16]; /* Temporary buffer. */
bfd_boolean lsl_p = FALSE; /* Is LSL shift operator? */
bfd_boolean wm_p = FALSE; /* Should Rm be Wm? */
bfd_boolean print_extend_p = TRUE;
@@ -2334,9 +2333,9 @@ print_register_offset_address (char *buf, size_t size,
if (print_extend_p)
{
if (print_amount_p)
- snprintf (tb, tblen, ",%s #%d", shift_name, opnd->shifter.amount);
+ snprintf (tb, sizeof (tb), ",%s #%d", shift_name, opnd->shifter.amount);
else
- snprintf (tb, tblen, ",%s", shift_name);
+ snprintf (tb, sizeof (tb), ",%s", shift_name);
}
else
tb[0] = '\0';