aboutsummaryrefslogtreecommitdiffstats
path: root/target-arm
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2010-09-22 14:19:28 +0200
committerDavid 'Digit' Turner <digit@android.com>2010-09-22 14:19:28 +0200
commit4e024bb4f5c8aa8b07459f7fbd65c35122127fd1 (patch)
treeccd5835eef17757d3e1c069e391c415c0135023d /target-arm
parent1d9873b37d2478554d9d678cd410bd3638c8dab3 (diff)
downloadexternal_qemu-4e024bb4f5c8aa8b07459f7fbd65c35122127fd1.zip
external_qemu-4e024bb4f5c8aa8b07459f7fbd65c35122127fd1.tar.gz
external_qemu-4e024bb4f5c8aa8b07459f7fbd65c35122127fd1.tar.bz2
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
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/op_helper.c9
-rw-r--r--target-arm/translate.c2
2 files changed, 8 insertions, 3 deletions
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;