diff options
author | Paul Irofti <pirofti@cvs.openbsd.org> | 2014-01-23 23:46:43 +0000 |
---|---|---|
committer | Paul Irofti <pirofti@cvs.openbsd.org> | 2014-01-23 23:46:43 +0000 |
commit | 0857e6688b8dd48c9acb2829221041d11513a5da (patch) | |
tree | 4bafce5dcb452d216cf00c804b2087d421b744b6 /sys | |
parent | 203ed5446f60ae8e592c4fbd37a555be0a647b8a (diff) |
Try to cope better with void pointer to int usage cases.
Use intptr_t for such cases.
More casts/types should be improved in this file.
Tested with syscall regression tests from IBM.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/linux/linux_file.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 0e87c9ddfc1..090a84b6c9a 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_file.c,v 1.28 2013/05/10 10:31:16 pirofti Exp $ */ +/* $OpenBSD: linux_file.c,v 1.29 2014/01/23 23:46:42 pirofti Exp $ */ /* $NetBSD: linux_file.c,v 1.15 1996/05/20 01:59:09 fvdl Exp $ */ /* @@ -48,6 +48,7 @@ #include <sys/vnode.h> #include <sys/tty.h> #include <sys/conf.h> +#include <sys/stdint.h> #include <sys/syscallargs.h> @@ -330,7 +331,8 @@ linux_sys_fcntl(p, v, retval) syscallarg(int) cmd; syscallarg(void *) arg; } */ *uap = v; - int fd, cmd, error, val; + int fd, cmd, error; + intptr_t val; caddr_t arg, sg; struct linux_flock lfl; struct flock *bfp, bfl; @@ -366,7 +368,7 @@ linux_sys_fcntl(p, v, retval) retval[0] = bsd_to_linux_ioflags(retval[0]); return 0; case LINUX_F_SETFL: - val = linux_to_bsd_ioflags((int)SCARG(uap, arg)); + val = linux_to_bsd_ioflags((intptr_t)SCARG(uap, arg)); SCARG(&fca, fd) = fd; SCARG(&fca, cmd) = F_SETFL; SCARG(&fca, arg) = (caddr_t) val; |