From 6e2d864edf5ef4d75e2fec061f4cd247b4d315be Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 15 Nov 2010 19:39:43 +0100 Subject: *-dis: Replace fprintf_ftype by fprintf_function (format checking) This patch adds more printf format checking. Additional modifications were needed for this code change: * alpha-dis.c: The local definition of MAX conflicts with a previous definition from osdep.h, so add an #undef. * dis-asm.h: Add include for fprintf_function (qemu-common.h). The standard (now redundant) includes are removed. * mis-dis.c: The definition of ARRAY_SIZE is no longer needed and must be removed (conflict with previous definition from qemu-common.h). * sh4-dis.c: Remove some unneeded forward declarations. Cc: Blue Swirl Signed-off-by: Stefan Weil Signed-off-by: Blue Swirl --- sh4-dis.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'sh4-dis.c') diff --git a/sh4-dis.c b/sh4-dis.c index 078a6b206b..673bc78380 100644 --- a/sh4-dis.c +++ b/sh4-dis.c @@ -1163,15 +1163,9 @@ const sh_opcode_info sh_table[] = #define INCLUDE_SHMEDIA #endif -static void print_movxy - (const sh_opcode_info *, int, int, fprintf_ftype, void *); -static void print_insn_ddt (int, struct disassemble_info *); -static void print_dsp_reg (int, fprintf_ftype, void *); -static void print_insn_ppi (int, struct disassemble_info *); - static void print_movxy (const sh_opcode_info *op, int rn, int rm, - fprintf_ftype fprintf_fn, void *stream) + fprintf_function fprintf_fn, void *stream) { int n; @@ -1247,7 +1241,7 @@ print_movxy (const sh_opcode_info *op, int rn, int rm, static void print_insn_ddt (int insn, struct disassemble_info *info) { - fprintf_ftype fprintf_fn = info->fprintf_func; + fprintf_function fprintf_fn = info->fprintf_func; void *stream = info->stream; /* If this is just a nop, make sure to emit something. */ @@ -1332,7 +1326,7 @@ print_insn_ddt (int insn, struct disassemble_info *info) } static void -print_dsp_reg (int rm, fprintf_ftype fprintf_fn, void *stream) +print_dsp_reg (int rm, fprintf_function fprintf_fn, void *stream) { switch (rm) { @@ -1377,7 +1371,7 @@ print_insn_ppi (int field_b, struct disassemble_info *info) { static const char *sx_tab[] = { "x0", "x1", "a0", "a1" }; static const char *sy_tab[] = { "y0", "y1", "m0", "m1" }; - fprintf_ftype fprintf_fn = info->fprintf_func; + fprintf_function fprintf_fn = info->fprintf_func; void *stream = info->stream; unsigned int nib1, nib2, nib3; unsigned int altnib1, nib4; @@ -1520,7 +1514,7 @@ print_insn_ppi (int field_b, struct disassemble_info *info) int print_insn_sh (bfd_vma memaddr, struct disassemble_info *info) { - fprintf_ftype fprintf_fn = info->fprintf_func; + fprintf_function fprintf_fn = info->fprintf_func; void *stream = info->stream; unsigned char insn[4]; unsigned char nibs[8]; -- cgit v1.2.1