summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-07-20 17:19:25 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-07-20 17:19:25 +0000
commit0bf9e31af1cc2915c9d250aab0ada0878df897ee (patch)
tree881f69538a0a506d2cbb41c7b0aa67bc8f4ea2bc /linux-user
parentc0a2a096a0f1655e604370ab373bf96f6784b69b (diff)
downloadhqemu-0bf9e31af1cc2915c9d250aab0ada0878df897ee.zip
hqemu-0bf9e31af1cc2915c9d250aab0ada0878df897ee.tar.gz
Fix most warnings (errors with -Werror) when debugging is enabled
I used the following command to enable debugging: perl -p -i -e 's/^\/\/#define DEBUG/#define DEBUG/g' * */* */*/* Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/mmap.c16
-rw-r--r--linux-user/signal.c4
-rw-r--r--linux-user/syscall.c2
3 files changed, 12 insertions, 10 deletions
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 79cb4e6..e05caa0 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -145,8 +145,8 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot)
int prot1, ret;
#ifdef DEBUG_MMAP
- printf("mprotect: start=0x" TARGET_FMT_lx
- "len=0x" TARGET_FMT_lx " prot=%c%c%c\n", start, len,
+ printf("mprotect: start=0x" TARGET_ABI_FMT_lx
+ "len=0x" TARGET_ABI_FMT_lx " prot=%c%c%c\n", start, len,
prot & PROT_READ ? 'r' : '-',
prot & PROT_WRITE ? 'w' : '-',
prot & PROT_EXEC ? 'x' : '-');
@@ -331,8 +331,8 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
mmap_lock();
#ifdef DEBUG_MMAP
{
- printf("mmap: start=0x" TARGET_FMT_lx
- " len=0x" TARGET_FMT_lx " prot=%c%c%c flags=",
+ printf("mmap: start=0x" TARGET_ABI_FMT_lx
+ " len=0x" TARGET_ABI_FMT_lx " prot=%c%c%c flags=",
start, len,
prot & PROT_READ ? 'r' : '-',
prot & PROT_WRITE ? 'w' : '-',
@@ -352,7 +352,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
printf("[MAP_TYPE=0x%x] ", flags & MAP_TYPE);
break;
}
- printf("fd=%d offset=" TARGET_FMT_lx "\n", fd, offset);
+ printf("fd=%d offset=" TARGET_ABI_FMT_lx "\n", fd, offset);
}
#endif
@@ -523,7 +523,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
page_set_flags(start, start + len, prot | PAGE_VALID);
the_end:
#ifdef DEBUG_MMAP
- printf("ret=0x" TARGET_FMT_lx "\n", start);
+ printf("ret=0x" TARGET_ABI_FMT_lx "\n", start);
page_dump(stdout);
printf("\n");
#endif
@@ -540,7 +540,9 @@ int target_munmap(abi_ulong start, abi_ulong len)
int prot, ret;
#ifdef DEBUG_MMAP
- printf("munmap: start=0x%lx len=0x%lx\n", start, len);
+ printf("munmap: start=0x" TARGET_ABI_FMT_lx " len=0x"
+ TARGET_ABI_FMT_lx "\n",
+ start, len);
#endif
if (start & ~TARGET_PAGE_MASK)
return -EINVAL;
diff --git a/linux-user/signal.c b/linux-user/signal.c
index c8150ee..b2c0623 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -584,8 +584,8 @@ int do_sigaction(int sig, const struct target_sigaction *act,
return -EINVAL;
k = &sigact_table[sig - 1];
#if defined(DEBUG_SIGNAL)
- fprintf(stderr, "sigaction sig=%d act=0x%08x, oact=0x%08x\n",
- sig, (int)act, (int)oact);
+ fprintf(stderr, "sigaction sig=%d act=0x%p, oact=0x%p\n",
+ sig, act, oact);
#endif
if (oact) {
oact->_sa_handler = tswapl(k->_sa_handler);
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 8b0a5fa..7b57323 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6977,7 +6977,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
}
fail:
#ifdef DEBUG
- gemu_log(" = %ld\n", ret);
+ gemu_log(" = " TARGET_ABI_FMT_ld "\n", ret);
#endif
if(do_strace)
print_syscall_ret(num, ret);
OpenPOWER on IntegriCloud