Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/darwin Fix newer compiler warning



details:   https://anonhg.NetBSD.org/src/rev/26be8c646619
branches:  trunk
changeset: 555951:26be8c646619
user:      manu <manu%NetBSD.org@localhost>
date:      Thu Dec 04 21:48:15 2003 +0000

description:
Fix newer compiler warning

diffstat:

 sys/compat/darwin/darwin_mman.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (40 lines):

diff -r c3ae127e99a2 -r 26be8c646619 sys/compat/darwin/darwin_mman.c
--- a/sys/compat/darwin/darwin_mman.c   Thu Dec 04 21:26:09 2003 +0000
+++ b/sys/compat/darwin/darwin_mman.c   Thu Dec 04 21:48:15 2003 +0000
@@ -1,6 +1,6 @@
 #undef DEBUG_DARWIN
 #undef DEBUG_MACH
-/*     $NetBSD: darwin_mman.c,v 1.10 2003/10/25 18:38:07 christos Exp $ */
+/*     $NetBSD: darwin_mman.c,v 1.11 2003/12/04 21:48:15 manu Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_mman.c,v 1.10 2003/10/25 18:38:07 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_mman.c,v 1.11 2003/12/04 21:48:15 manu Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -90,6 +90,7 @@
        size_t maplen;
        struct sys_open_args open_cup;
        struct sys_close_args close_cup;
+       register_t fdc;
        int fd;
        int i;
        int error;
@@ -122,9 +123,10 @@
        SCARG(&open_cup, path) = SCARG(uap, filename);
        SCARG(&open_cup, flags) = O_RDONLY;
        SCARG(&open_cup, mode) = 0;
-       if ((error = bsd_sys_open(l, &open_cup, (register_t *)&fd)) != 0)
+       if ((error = bsd_sys_open(l, &open_cup, &fdc)) != 0)
                return error;
        
+       fd = (int)fdc;
        fdp = p->p_fd;
        fp = fd_getfile(fdp, fd);
        if (fp == NULL) {



Home | Main Index | Thread Index | Old Index