diff options
author | David 'Digit' Turner <digit@android.com> | 2010-09-22 14:19:28 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2010-09-22 14:19:28 +0200 |
commit | 4e024bb4f5c8aa8b07459f7fbd65c35122127fd1 (patch) | |
tree | ccd5835eef17757d3e1c069e391c415c0135023d /memcheck | |
parent | 1d9873b37d2478554d9d678cd410bd3638c8dab3 (diff) | |
download | external_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 'memcheck')
-rw-r--r-- | memcheck/memcheck.c | 4 | ||||
-rw-r--r-- | memcheck/memcheck_proc_management.c | 1 | ||||
-rw-r--r-- | memcheck/memcheck_util.c | 4 | ||||
-rw-r--r-- | memcheck/memcheck_util.h | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/memcheck/memcheck.c b/memcheck/memcheck.c index 8e0a1f8..3c8194a 100644 --- a/memcheck/memcheck.c +++ b/memcheck/memcheck.c @@ -138,7 +138,7 @@ av_access_violation(ProcDesc* proc, } memset(align, ' ', set_align); align[set_align] = '\0'; - printf(align); + printf("%s", align); if (inl[index].inlined_in_file == NULL) { printf("inlined to %s in unknown location\n", inl[index].routine_name); @@ -561,7 +561,7 @@ void memcheck_guest_print_str(target_ulong str) { char str_copy[4096]; memcheck_get_guest_string(str_copy, str, sizeof(str_copy)); - printf(str_copy); + printf("%s", str_copy); } /* Validates read operations, detected in __ldx_mmu routine. diff --git a/memcheck/memcheck_proc_management.c b/memcheck/memcheck_proc_management.c index 4120b9f..593ba32 100644 --- a/memcheck/memcheck_proc_management.c +++ b/memcheck/memcheck_proc_management.c @@ -25,6 +25,7 @@ #include "memcheck.h" #include "memcheck_proc_management.h" #include "memcheck_logging.h" +#include "memcheck_util.h" /* Current thread id. * This value is updated with each call to memcheck_switch, saving here diff --git a/memcheck/memcheck_util.c b/memcheck/memcheck_util.c index cc4182d..5449488 100644 --- a/memcheck/memcheck_util.c +++ b/memcheck/memcheck_util.c @@ -102,7 +102,7 @@ memcheck_get_guest_buffer(void* qemu_address, * read / write guest's memory. */ while (buffer_size) { *(uint8_t*)qemu_address = ldub_user(guest_address); - (uint32_t)qemu_address++; + qemu_address = (uint8_t*)qemu_address + 1; guest_address++; buffer_size--; } @@ -116,7 +116,7 @@ memcheck_set_guest_buffer(target_ulong guest_address, while (buffer_size) { stb_user(guest_address, *(uint8_t*)qemu_address); guest_address++; - (uint32_t)qemu_address++; + qemu_address = (uint8_t*)qemu_address + 1; buffer_size--; } } diff --git a/memcheck/memcheck_util.h b/memcheck/memcheck_util.h index d4f6c8a..b75ee53 100644 --- a/memcheck/memcheck_util.h +++ b/memcheck/memcheck_util.h @@ -24,7 +24,7 @@ #endif // CONFIG_MEMCHECK #include "memcheck_common.h" -#include "elff_api.h" +#include "elff/elff_api.h" #ifdef __cplusplus extern "C" { |