Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern An Elf32_Addr can't be cast to caddr_t without firs...



details:   https://anonhg.NetBSD.org/src/rev/02d10a42a018
branches:  trunk
changeset: 581647:02d10a42a018
user:      he <he%NetBSD.org@localhost>
date:      Fri Jun 03 13:30:10 2005 +0000

description:
An Elf32_Addr can't be cast to caddr_t without first being cast to intptr_t
without causing a warning (turned into error).  Fixes build problem for amd64.

diffstat:

 sys/kern/core_elf32.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r f4cc0b8fc422 -r 02d10a42a018 sys/kern/core_elf32.c
--- a/sys/kern/core_elf32.c     Fri Jun 03 13:21:35 2005 +0000
+++ b/sys/kern/core_elf32.c     Fri Jun 03 13:30:10 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: core_elf32.c,v 1.16 2005/06/02 17:01:43 matt Exp $     */
+/*     $NetBSD: core_elf32.c,v 1.17 2005/06/03 13:30:10 he Exp $       */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.16 2005/06/02 17:01:43 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.17 2005/06/03 13:30:10 he Exp $");
 
 /* If not included by core_elf64.c, ELFSIZE won't be defined. */
 #ifndef ELFSIZE
@@ -226,7 +226,8 @@
 #endif
 
                error = vn_rdwr(UIO_WRITE, vp,
-                   (caddr_t) psections[i].p_vaddr, psections[i].p_filesz,
+                   (caddr_t)((intptr_t) psections[i].p_vaddr),
+                   psections[i].p_filesz,
                    psections[i].p_offset, UIO_USERSPACE,
                    IO_NODELOCKED|IO_UNIT, cred, NULL, p);
                if (error)



Home | Main Index | Thread Index | Old Index