Patchwork [02/14] Use fprint_function and fix wrong format specifiers

login
register
mail settings
Submitter Stefan Weil
Date March 29, 2010, 7:16 p.m.
Message ID <1269890225-13639-3-git-send-email-weil@mail.berlios.de>
Download mbox | patch
Permalink /patch/48888/
State New
Headers show

Comments

Stefan Weil - March 29, 2010, 7:16 p.m.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 exec.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/exec.c b/exec.c
index 0916208..6be15c4 100644
--- a/exec.c
+++ b/exec.c
@@ -3964,8 +3964,7 @@  void cpu_io_recompile(CPUState *env, void *retaddr)
 
 #if !defined(CONFIG_USER_ONLY)
 
-void dump_exec_info(FILE *f,
-                    int (*cpu_fprintf)(FILE *f, const char *fmt, ...))
+void dump_exec_info(FILE *f, fprintf_function cpu_fprintf)
 {
     int i, target_code_size, max_target_code_size;
     int direct_jmp_count, direct_jmp2_count, cross_page;
@@ -3992,15 +3991,16 @@  void dump_exec_info(FILE *f,
     }
     /* XXX: avoid using doubles ? */
     cpu_fprintf(f, "Translation buffer state:\n");
-    cpu_fprintf(f, "gen code size       %ld/%ld\n",
-                code_gen_ptr - code_gen_buffer, code_gen_buffer_max_size);
+    cpu_fprintf(f, "gen code size       %d/%ld\n",
+                (int)(code_gen_ptr - code_gen_buffer),
+                code_gen_buffer_max_size);
     cpu_fprintf(f, "TB count            %d/%d\n", 
                 nb_tbs, code_gen_max_blocks);
     cpu_fprintf(f, "TB avg target size  %d max=%d bytes\n",
                 nb_tbs ? target_code_size / nb_tbs : 0,
                 max_target_code_size);
     cpu_fprintf(f, "TB avg host size    %d bytes (expansion ratio: %0.1f)\n",
-                nb_tbs ? (code_gen_ptr - code_gen_buffer) / nb_tbs : 0,
+                (int)(nb_tbs ? (code_gen_ptr - code_gen_buffer) / nb_tbs : 0),
                 target_code_size ? (double) (code_gen_ptr - code_gen_buffer) / target_code_size : 0);
     cpu_fprintf(f, "cross page TB count %d (%d%%)\n",
             cross_page,