summaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-16 12:13:52 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-16 12:13:52 +0000
commitb5663e4f8e404b6064094ba8b002da15b25f6336 (patch)
tree34ff707ff9bc0d57dd583c1b19f683defcfea80a /linux-user
parenta46c32f23e8d8126f7d9b869446f26151876b9e7 (diff)
downloadqemu-b5663e4f8e404b6064094ba8b002da15b25f6336.tar.gz
qemu-b5663e4f8e404b6064094ba8b002da15b25f6336.tar.bz2
qemu-b5663e4f8e404b6064094ba8b002da15b25f6336.zip
Fix a bunch of type mismatch-related warnings (Jan Kiszka).
Fix a typo in my previous comming (spotted by Laurent Desnouges). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4877 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/flatload.c6
-rw-r--r--linux-user/m68k-sim.c12
-rw-r--r--linux-user/signal.c6
-rw-r--r--linux-user/syscall.c1
4 files changed, 13 insertions, 12 deletions
diff --git a/linux-user/flatload.c b/linux-user/flatload.c
index 95d386468a..29664b1447 100644
--- a/linux-user/flatload.c
+++ b/linux-user/flatload.c
@@ -349,9 +349,9 @@ void old_reloc(struct lib_info *libinfo, uint32_t rl)
reloc_type = rl >> 30;
/* ??? How to handle this? */
#if defined(CONFIG_COLDFIRE)
- ptr = (uint32_t *) (libinfo->start_code + offset);
+ ptr = (uint32_t *) ((unsigned long) libinfo->start_code + offset);
#else
- ptr = (uint32_t *) (libinfo->start_data + offset);
+ ptr = (uint32_t *) ((unsigned long) libinfo->start_data + offset);
#endif
#ifdef DEBUG
@@ -670,7 +670,7 @@ static int load_flat_file(struct linux_binprm * bprm,
}
/* zero the BSS. */
- memset((void*)(datapos + data_len), 0, bss_len);
+ memset((void *)((unsigned long)datapos + data_len), 0, bss_len);
return 0;
}
diff --git a/linux-user/m68k-sim.c b/linux-user/m68k-sim.c
index 61c2468752..149399b547 100644
--- a/linux-user/m68k-sim.c
+++ b/linux-user/m68k-sim.c
@@ -101,19 +101,19 @@ void do_m68k_simcall(CPUM68KState *env, int nr)
{
uint32_t *args;
- args = (uint32_t *)(env->aregs[7] + 4);
+ args = (uint32_t *)(unsigned long)(env->aregs[7] + 4);
switch (nr) {
case SYS_EXIT:
exit(ARG(0));
case SYS_READ:
- check_err(env, read(ARG(0), (void *)ARG(1), ARG(2)));
+ check_err(env, read(ARG(0), (void *)(unsigned long)ARG(1), ARG(2)));
break;
case SYS_WRITE:
- check_err(env, write(ARG(0), (void *)ARG(1), ARG(2)));
+ check_err(env, write(ARG(0), (void *)(unsigned long)ARG(1), ARG(2)));
break;
case SYS_OPEN:
- check_err(env, open((char *)ARG(0), translate_openflags(ARG(1)),
- ARG(2)));
+ check_err(env, open((char *)(unsigned long)ARG(0),
+ translate_openflags(ARG(1)), ARG(2)));
break;
case SYS_CLOSE:
{
@@ -142,7 +142,7 @@ void do_m68k_simcall(CPUM68KState *env, int nr)
struct m86k_sim_stat *p;
rc = check_err(env, fstat(ARG(0), &s));
if (rc == 0) {
- p = (struct m86k_sim_stat *)ARG(1);
+ p = (struct m86k_sim_stat *)(unsigned long)ARG(1);
p->sim_st_dev = tswap16(s.st_dev);
p->sim_st_ino = tswap16(s.st_ino);
p->sim_st_mode = tswap32(s.st_mode);
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 599b8af2c0..af40238b2b 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -2755,7 +2755,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka,
/* Create the ucontext. */
err |= __put_user(0, &frame->uc.uc_flags);
err |= __put_user(0, (unsigned long *)&frame->uc.uc_link);
- err |= __put_user((void *)target_sigaltstack_used.ss_sp,
+ err |= __put_user((unsigned long)target_sigaltstack_used.ss_sp,
&frame->uc.uc_stack.ss_sp);
err |= __put_user(sas_ss_flags(regs->gregs[15]),
&frame->uc.uc_stack.ss_flags);
@@ -2982,11 +2982,11 @@ static void setup_frame(int sig, struct target_sigaction *ka,
setup_sigcontext(&frame->sc, env);
/* Move the stack and setup the arguments for the handler. */
- env->regs[R_SP] = (uint32_t) frame;
+ env->regs[R_SP] = (uint32_t) (unsigned long) frame;
env->regs[10] = sig;
env->pc = (unsigned long) ka->_sa_handler;
/* Link SRP so the guest returns through the trampoline. */
- env->pregs[PR_SRP] = (uint32_t) &frame->retcode[0];
+ env->pregs[PR_SRP] = (uint32_t) (unsigned long) &frame->retcode[0];
unlock_user_struct(frame, frame_addr, 1);
return;
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 839ac7f757..c1cfe801cb 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -72,6 +72,7 @@
#include "linux_loop.h"
#include "qemu.h"
+#include "qemu-common.h"
#if defined(USE_NPTL)
#include <linux/futex.h>