aboutsummaryrefslogtreecommitdiffstats
path: root/hw/goldfish_trace.c
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 /hw/goldfish_trace.c
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 'hw/goldfish_trace.c')
-rw-r--r--hw/goldfish_trace.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/goldfish_trace.c b/hw/goldfish_trace.c
index a7e589d..fc338c8 100644
--- a/hw/goldfish_trace.c
+++ b/hw/goldfish_trace.c
@@ -15,8 +15,11 @@
*/
#include "qemu_file.h"
#include "goldfish_trace.h"
+#include "sysemu.h"
+#include "trace.h"
#ifdef CONFIG_MEMCHECK
#include "memcheck/memcheck.h"
+#include "memcheck/memcheck_util.h"
#endif // CONFIG_MEMCHECK
//#define DEBUG 1
@@ -46,6 +49,8 @@ static void trace_dev_write(void *opaque, target_phys_addr_t offset, uint32_t va
{
trace_dev_state *s = (trace_dev_state *)opaque;
+ (void)s;
+
switch (offset >> 2) {
case TRACE_DEV_REG_SWITCH: // context switch, switch to pid
if (trace_filename != NULL) {
@@ -128,7 +133,7 @@ static void trace_dev_write(void *opaque, target_phys_addr_t offset, uint32_t va
cmdlen = value;
break;
case TRACE_DEV_REG_CMDLINE: // execve, process cmdline
- cpu_memory_rw_debug(cpu_single_env, value, exec_arg, cmdlen, 0);
+ cpu_memory_rw_debug(cpu_single_env, value, (uint8_t*)exec_arg, cmdlen, 0);
if (trace_filename != NULL) {
trace_execve(exec_arg, cmdlen);
}
@@ -351,6 +356,8 @@ static uint32_t trace_dev_read(void *opaque, target_phys_addr_t offset)
{
trace_dev_state *s = (trace_dev_state *)opaque;
+ (void)s;
+
switch (offset >> 2) {
case TRACE_DEV_REG_ENABLE: // tracing enable
return tracing;
@@ -378,7 +385,6 @@ static CPUWriteMemoryFunc *trace_dev_writefn[] = {
/* initialize the trace device */
void trace_dev_init()
{
- int iomemtype;
trace_dev_state *s;
s = (trace_dev_state *)qemu_mallocz(sizeof(trace_dev_state));