summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2010-04-09 22:49:50 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-04-14 01:04:01 +0200
commit07b1a9da1767ac1481754e54cc46e45c953698e0 (patch)
treecd833031dfc8bf4acd7dc7d71dcdddb4fdf5c1e1
parent60bf84cf4ce277e1212929f35674796888a681ce (diff)
downloadqemu-07b1a9da1767ac1481754e54cc46e45c953698e0.tar.gz
qemu-07b1a9da1767ac1481754e54cc46e45c953698e0.tar.bz2
qemu-07b1a9da1767ac1481754e54cc46e45c953698e0.zip
arm: Fix compiler warning (fprintf format string)
When argument checking is enabled, gcc throws this error: error: format not a string literal and no format arguments The patch rewrites the statement to satisfy the compiler. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r--arm-dis.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arm-dis.c b/arm-dis.c
index 4fb899e388..50285550c0 100644
--- a/arm-dis.c
+++ b/arm-dis.c
@@ -3149,14 +3149,14 @@ print_insn_thumb16 (bfd_vma pc, struct disassemble_info *info, long given)
if (started)
func (stream, ", ");
started = 1;
- func (stream, arm_regnames[14] /* "lr" */);
+ func (stream, "%s", arm_regnames[14] /* "lr" */);
}
if (domaskpc)
{
if (started)
func (stream, ", ");
- func (stream, arm_regnames[15] /* "pc" */);
+ func (stream, "%s", arm_regnames[15] /* "pc" */);
}
func (stream, "}");
@@ -3699,7 +3699,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
}
else
{
- func (stream, psr_name (given & 0xff));
+ func (stream, "%s", psr_name (given & 0xff));
}
break;
@@ -3707,7 +3707,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
if ((given & 0xff) == 0)
func (stream, "%cPSR", (given & 0x100000) ? 'S' : 'C');
else
- func (stream, psr_name (given & 0xff));
+ func (stream, "%s", psr_name (given & 0xff));
break;
case '0': case '1': case '2': case '3': case '4':