diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/link_elf.c | 6 | ||||
-rw-r--r-- | sys/kern/link_elf_obj.c | 6 | ||||
-rw-r--r-- | sys/kern/subr_scanf.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_bio.c | 9 |
4 files changed, 13 insertions, 12 deletions
diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index 0cfef4f..e30294e 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: link_elf.c,v 1.16 1999/01/29 09:04:27 bde Exp $ + * $Id: link_elf.c,v 1.17 1999/05/08 13:03:49 peter Exp $ */ #include <sys/param.h> @@ -157,7 +157,7 @@ link_elf_init(void* arg) panic("link_elf_init: Can't create linker structures for kernel"); parse_dynamic(linker_kernel_file); linker_kernel_file->address = (caddr_t) KERNBASE; - linker_kernel_file->size = -(long)linker_kernel_file->address; + linker_kernel_file->size = -(intptr_t)linker_kernel_file->address; if (modptr) { ef->modptr = modptr; @@ -950,7 +950,7 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value, c_linker_sym_t* sym, long* diffp) { elf_file_t ef = lf->priv; - u_long off = (u_long) value; + u_long off = (uintptr_t) value; u_long diff = off; const Elf_Sym* es; const Elf_Sym* best = 0; diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 0cfef4f..e30294e 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: link_elf.c,v 1.16 1999/01/29 09:04:27 bde Exp $ + * $Id: link_elf.c,v 1.17 1999/05/08 13:03:49 peter Exp $ */ #include <sys/param.h> @@ -157,7 +157,7 @@ link_elf_init(void* arg) panic("link_elf_init: Can't create linker structures for kernel"); parse_dynamic(linker_kernel_file); linker_kernel_file->address = (caddr_t) KERNBASE; - linker_kernel_file->size = -(long)linker_kernel_file->address; + linker_kernel_file->size = -(intptr_t)linker_kernel_file->address; if (modptr) { ef->modptr = modptr; @@ -950,7 +950,7 @@ link_elf_search_symbol(linker_file_t lf, caddr_t value, c_linker_sym_t* sym, long* diffp) { elf_file_t ef = lf->priv; - u_long off = (u_long) value; + u_long off = (uintptr_t) value; u_long diff = off; const Elf_Sym* es; const Elf_Sym* best = 0; diff --git a/sys/kern/subr_scanf.c b/sys/kern/subr_scanf.c index 6d65d98..8b1f740 100644 --- a/sys/kern/subr_scanf.c +++ b/sys/kern/subr_scanf.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: subr_scanf.c,v 1.4 1999/01/29 08:09:32 dillon Exp $ + * $Id: subr_scanf.c,v 1.5 1999/02/14 20:58:21 dillon Exp $ * From: Id: vfscanf.c,v 1.13 1998/09/25 12:20:27 obrien Exp */ @@ -517,7 +517,7 @@ literal: res = (*ccfn)(buf, (const char **)NULL, base); if (flags & POINTER) *va_arg(ap, void **) = - (void *)(u_long)res; + (void *)(uintptr_t)res; else if (flags & SHORT) *va_arg(ap, short *) = res; else if (flags & LONG) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 83a55b9..f23db16 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -11,7 +11,7 @@ * 2. Absolutely no warranty of function or purpose is made by the author * John S. Dyson. * - * $Id: vfs_bio.c,v 1.224 1999/07/26 06:25:16 alc Exp $ + * $Id: vfs_bio.c,v 1.225 1999/08/08 18:42:48 phk Exp $ */ /* @@ -2972,10 +2972,11 @@ vfs_bio_clrbuf(struct buf *bp) { } ea = sa = bp->b_data; for(i=0;i<bp->b_npages;i++,sa=ea) { - int j = ((u_long)sa & PAGE_MASK) / DEV_BSIZE; + int j = ((vm_offset_t)sa & PAGE_MASK) / DEV_BSIZE; ea = (caddr_t)trunc_page((vm_offset_t)sa + PAGE_SIZE); - ea = (caddr_t)ulmin((u_long)ea, - (u_long)bp->b_data + bp->b_bufsize); + ea = (caddr_t)(vm_offset_t)ulmin( + (u_long)(vm_offset_t)ea, + (u_long)(vm_offset_t)bp->b_data + bp->b_bufsize); mask = ((1 << ((ea - sa) / DEV_BSIZE)) - 1) << j; if ((bp->b_pages[i]->valid & mask) == mask) continue; |