aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2010-04-09 22:49:51 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-04-14 01:04:02 +0200
commitd14a68b6dc0cc01ddd4c1c7c5907b95c3938679c (patch)
treec41103a006905bb6b0a2853c091d3c8788014770
parent07b1a9da1767ac1481754e54cc46e45c953698e0 (diff)
m68k: 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. It also removes a type cast which is not needed. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r--m68k-dis.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/m68k-dis.c b/m68k-dis.c
index d38d5a2591..7cd88f8509 100644
--- a/m68k-dis.c
+++ b/m68k-dis.c
@@ -1104,7 +1104,7 @@ print_insn_arg (const char *d,
{
static const char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" };
val = fetch_arg (buffer, place, 2, info);
- (*info->fprintf_func) (info->stream, cacheFieldName[val]);
+ (*info->fprintf_func) (info->stream, "%s", cacheFieldName[val]);
break;
}
@@ -1199,7 +1199,7 @@ print_insn_arg (const char *d,
{
static const char *const scalefactor_name[] = { "<<", ">>" };
val = fetch_arg (buffer, place, 1, info);
- (*info->fprintf_func) (info->stream, scalefactor_name[val]);
+ (*info->fprintf_func) (info->stream, "%s", scalefactor_name[val]);
}
else
{
@@ -1804,7 +1804,7 @@ match_insn_m68k (bfd_vma memaddr,
save_p = p;
info->print_address_func = dummy_print_address;
- info->fprintf_func = (fprintf_ftype) dummy_printer;
+ info->fprintf_func = dummy_printer;
/* We scan the operands twice. The first time we don't print anything,
but look for errors. */