From 4e024bb4f5c8aa8b07459f7fbd65c35122127fd1 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Wed, 22 Sep 2010 14:19:28 +0200 Subject: Remove compiler warnings when building the emulator. This forces -Wall during the build. Note that this patch doesn't remove all warnings, but most of the remaining ones are from upstream anyway. Change-Id: I8808d8495e99866e156ce5780d2e3c305eab491f --- target-arm/op_helper.c | 9 +++++++-- target-arm/translate.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'target-arm') diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 05eb558..6d8db29 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -67,10 +67,13 @@ uint32_t HELPER(neon_tbl)(uint32_t ireg, uint32_t def, #if !defined(CONFIG_USER_ONLY) +//#define ALIGNED_ONLY 1 + +#if ALIGNED_ONLY == 1 static void do_unaligned_access (target_ulong addr, int is_write, int is_user, void *retaddr); +#endif #define MMUSUFFIX _mmu -//#define ALIGNED_ONLY 1 #define SHIFT 0 #include "softmmu_template.h" @@ -84,6 +87,7 @@ static void do_unaligned_access (target_ulong addr, int is_write, int is_user, v #define SHIFT 3 #include "softmmu_template.h" +#if ALIGNED_ONLY == 1 static void do_unaligned_access (target_ulong addr, int is_write, int mmu_idx, void *retaddr) { //printf("::UNALIGNED:: addr=%lx is_write=%d is_user=%d retaddr=%p\n", addr, is_write, is_user, retaddr); @@ -96,6 +100,7 @@ static void do_unaligned_access (target_ulong addr, int is_write, int mmu_idx, v cpu_loop_exit(); } } +#endif /* try to fill the TLB and return an exception if error. If retaddr is NULL, it means that the function was called in C code (i.e. not @@ -137,7 +142,7 @@ void vstrcpy(target_ulong ptr, char *buf, int max) if (buf == NULL) return; for (index = 0; index < max; index += 1) { - cpu_physical_memory_read(ptr + index, buf + index, 1); + cpu_physical_memory_read(ptr + index, (uint8_t*)buf + index, 1); if (buf[index] == 0) break; } diff --git a/target-arm/translate.c b/target-arm/translate.c index 275356d..d298f89 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -5798,7 +5798,7 @@ static void disas_arm_insn(CPUState * env, DisasContext *s) { unsigned int cond, insn, val, op1, i, shift, rm, rs, rn, rd, sh; #ifdef CONFIG_TRACE - int ticks; + int ticks = 0; #endif TCGv tmp; TCGv tmp2; -- cgit v1.1