Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcmips/vr Add use of __UNCONST() to an invocation ...



details:   https://anonhg.NetBSD.org/src/rev/ff9b5b6cbafc
branches:  trunk
changeset: 581844:ff9b5b6cbafc
user:      he <he%NetBSD.org@localhost>
date:      Tue Jun 07 12:06:55 2005 +0000

description:
Add use of __UNCONST() to an invocation of tpcalib_ioctl(), as that
function may both read and write it's argument.  Here it is only
reading from the data argument under WSMOUSEIO_SCALIBCOORDS, so it
is actually fine, but type protection can't express this.

diffstat:

 sys/arch/hpcmips/vr/vrpiu.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 80dd856d3507 -r ff9b5b6cbafc sys/arch/hpcmips/vr/vrpiu.c
--- a/sys/arch/hpcmips/vr/vrpiu.c       Tue Jun 07 12:02:46 2005 +0000
+++ b/sys/arch/hpcmips/vr/vrpiu.c       Tue Jun 07 12:06:55 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vrpiu.c,v 1.33 2004/05/28 17:52:07 tsarna Exp $        */
+/*     $NetBSD: vrpiu.c,v 1.34 2005/06/07 12:06:55 he Exp $    */
 
 /*
  * Copyright (c) 1999-2003 TAKEMURA Shin All rights reserved.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vrpiu.c,v 1.33 2004/05/28 17:52:07 tsarna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vrpiu.c,v 1.34 2005/06/07 12:06:55 he Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -302,7 +302,7 @@
                                break;
                }
                tpcalib_ioctl(&sc->sc_tpcalib, WSMOUSEIO_SCALIBCOORDS,
-                   (caddr_t)&calibrations[i].coords, 0, 0);
+                   (caddr_t)__UNCONST(&calibrations[i].coords), 0, 0);
        }
 #endif
 



Home | Main Index | Thread Index | Old Index