]> git.proxmox.com Git - qemu.git/commitdiff
sh4: Fix compiler warning (fprintf format string)
authorStefan Weil <weil@mail.berlios.de>
Fri, 9 Apr 2010 20:49:52 +0000 (22:49 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 13 Apr 2010 23:04:02 +0000 (01:04 +0200)
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>
sh4-dis.c

index 41fd8667b8fe6fd5c9957ad2e10bfeb970d9b034..078a6b206b65e65381c1538c855798acd978004a 100644 (file)
--- a/sh4-dis.c
+++ b/sh4-dis.c
@@ -1493,10 +1493,10 @@ print_insn_ppi (int field_b, struct disassemble_info *info)
                  print_dsp_reg (field_b & 0xf, fprintf_fn, stream);
                  break;
                case DSP_REG_X:
-                 fprintf_fn (stream, sx_tab[(field_b >> 6) & 3]);
+                 fprintf_fn (stream, "%s", sx_tab[(field_b >> 6) & 3]);
                  break;
                case DSP_REG_Y:
-                 fprintf_fn (stream, sy_tab[(field_b >> 4) & 3]);
+                 fprintf_fn (stream, "%s", sy_tab[(field_b >> 4) & 3]);
                  break;
                case A_MACH:
                  fprintf_fn (stream, "mach");