diff options
author | bde <bde@FreeBSD.org> | 1998-07-15 02:32:35 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-07-15 02:32:35 +0000 |
commit | 863d5c8b6850a65e8b4e00a7b23bbd29bd466602 (patch) | |
tree | 503589837ac05f783d5305211b0f41aed97e2041 /sys/vm | |
parent | b99f2f9d598baa39c296f1cf2d910a1f7e138bb1 (diff) | |
download | FreeBSD-src-863d5c8b6850a65e8b4e00a7b23bbd29bd466602.zip FreeBSD-src-863d5c8b6850a65e8b4e00a7b23bbd29bd466602.tar.gz |
Cast pointers to uintptr_t/intptr_t instead of to u_long/long,
respectively. Most of the longs should probably have been
u_longs, but this changes is just to prevent warnings about
casts between pointers and integers of different sizes, not
to fix poorly chosen types.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/device_pager.c | 6 | ||||
-rw-r--r-- | sys/vm/vm_mmap.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index 348ace0..6bf0955 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)device_pager.c 8.1 (Berkeley) 6/11/93 - * $Id: device_pager.c,v 1.29 1998/02/04 22:33:40 eivind Exp $ + * $Id: device_pager.c,v 1.30 1998/02/06 12:14:20 eivind Exp $ */ #include <sys/param.h> @@ -100,7 +100,7 @@ dev_pager_alloc(void *handle, vm_size_t size, vm_prot_t prot, vm_ooffset_t foff) /* * Make sure this device can be mapped. */ - dev = (dev_t) (u_long) handle; + dev = (dev_t) (uintptr_t) handle; mapfunc = cdevsw[major(dev)]->d_mmap; if (mapfunc == NULL || mapfunc == (d_mmap_t *)nullop) { printf("obsolete map function %p\n", (void *)mapfunc); @@ -194,7 +194,7 @@ dev_pager_getpages(object, m, count, reqpage) d_mmap_t *mapfunc; int prot; - dev = (dev_t) (u_long) object->handle; + dev = (dev_t) (uintptr_t) object->handle; offset = m[reqpage]->pindex + OFF_TO_IDX(object->paging_offset); prot = PROT_READ; /* XXX should pass in? */ mapfunc = cdevsw[major(dev)]->d_mmap; diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 026f4c2..b66d5c7 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -38,7 +38,7 @@ * from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$ * * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94 - * $Id: vm_mmap.c,v 1.79 1998/06/21 18:02:47 bde Exp $ + * $Id: vm_mmap.c,v 1.80 1998/07/05 11:56:52 dfr Exp $ */ /* @@ -970,7 +970,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, vp = (struct vnode *) handle; if (vp->v_type == VCHR) { type = OBJT_DEVICE; - handle = (void *)(long)vp->v_rdev; + handle = (void *)(intptr_t)vp->v_rdev; } else { struct vattr vat; int error; |