Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/prep Adapt to compiling with -Wcast-qual and -Wshadow.



details:   https://anonhg.NetBSD.org/src/rev/9d3393260a94
branches:  trunk
changeset: 581782:9d3393260a94
user:      he <he%NetBSD.org@localhost>
date:      Sun Jun 05 17:56:31 2005 +0000

description:
Adapt to compiling with -Wcast-qual and -Wshadow.

diffstat:

 sys/arch/prep/include/autoconf.h |   4 ++--
 sys/arch/prep/prep/clock.c       |  16 ++++++++--------
 sys/arch/prep/prep/disksubr.c    |   6 +++---
 3 files changed, 13 insertions(+), 13 deletions(-)

diffs (94 lines):

diff -r 962a76daa69b -r 9d3393260a94 sys/arch/prep/include/autoconf.h
--- a/sys/arch/prep/include/autoconf.h  Sun Jun 05 15:43:30 2005 +0000
+++ b/sys/arch/prep/include/autoconf.h  Sun Jun 05 17:56:31 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.h,v 1.2 2002/07/05 18:45:23 matt Exp $        */
+/*     $NetBSD: autoconf.h,v 1.3 2005/06/05 17:56:31 he Exp $  */
 
 /*-
  * Copyright (C) 1998  Internet Research Institute, Inc.
@@ -32,7 +32,7 @@
  */
 
 struct confargs {
-       char *ca_name;
+       const char *ca_name;
        u_int ca_node;
        int ca_nreg;
        u_int *ca_reg;
diff -r 962a76daa69b -r 9d3393260a94 sys/arch/prep/prep/clock.c
--- a/sys/arch/prep/prep/clock.c        Sun Jun 05 15:43:30 2005 +0000
+++ b/sys/arch/prep/prep/clock.c        Sun Jun 05 17:56:31 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.10 2005/06/04 20:14:24 he Exp $    */
+/*     $NetBSD: clock.c,v 1.11 2005/06/05 17:56:31 he Exp $    */
 /*      $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
 
 /*
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.10 2005/06/04 20:14:24 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.11 2005/06/05 17:56:31 he Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -174,7 +174,7 @@
        int msr;
        int pri;
        u_long tb;
-       long tick;
+       long ticks;
        int nticks;
        extern long intrcnt[];
 
@@ -193,16 +193,16 @@
        } else {
                asm volatile ("mftb %0" : "=r"(tb));
        }
-       asm ("mfdec %0" : "=r"(tick));
-       for (nticks = 0; tick < 0; nticks++)
-               tick += ticks_per_intr;
-       asm volatile ("mtdec %0" :: "r"(tick));
+       asm ("mfdec %0" : "=r"(ticks));
+       for (nticks = 0; ticks < 0; nticks++)
+               ticks += ticks_per_intr;
+       asm volatile ("mtdec %0" :: "r"(ticks));
 
        /*
         * lasttb is used during microtime. Set it to the virtual
         * start of this tick interval.
         */
-       lasttb = tb + tick - ticks_per_intr;
+       lasttb = tb + ticks - ticks_per_intr;
 
        intrcnt[CNT_CLOCK]++;
 
diff -r 962a76daa69b -r 9d3393260a94 sys/arch/prep/prep/disksubr.c
--- a/sys/arch/prep/prep/disksubr.c     Sun Jun 05 15:43:30 2005 +0000
+++ b/sys/arch/prep/prep/disksubr.c     Sun Jun 05 17:56:31 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.11 2003/10/08 04:25:46 lukem Exp $      */
+/*     $NetBSD: disksubr.c,v 1.12 2005/06/05 17:56:31 he Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.11 2003/10/08 04:25:46 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.12 2005/06/05 17:56:31 he Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -135,7 +135,7 @@
        struct dkbad *bdp;
        struct buf *bp;
        struct disklabel *dlp;
-       char *msg = NULL;
+       const char *msg = NULL;
        int dospartoff, cyl, i, *ip;
 
        /* minimal requirements for archtypal disk label */



Home | Main Index | Thread Index | Old Index