Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm Fix -Wcast-qual by sprinkling some consts, and ...



details:   https://anonhg.NetBSD.org/src/rev/afa3ae1cc537
branches:  trunk
changeset: 581755:afa3ae1cc537
user:      he <he%NetBSD.org@localhost>
date:      Sat Jun 04 22:37:51 2005 +0000

description:
Fix -Wcast-qual by sprinkling some consts, and remove named
parameters from a function prototype to avoid shadowing.
Also fix a couple of other shadowing problems.

diffstat:

 sys/arch/arm/ep93xx/epclk.c        |  6 +++---
 sys/arch/arm/ep93xx/epcom.c        |  6 +++---
 sys/arch/arm/ep93xx/epsoc.c        |  6 +++---
 sys/arch/arm/s3c2xx0/s3c24x0_clk.c |  7 +++----
 sys/arch/arm/s3c2xx0/s3c24x0_lcd.c |  8 ++++----
 5 files changed, 16 insertions(+), 17 deletions(-)

diffs (138 lines):

diff -r 2a1f7c63a351 -r afa3ae1cc537 sys/arch/arm/ep93xx/epclk.c
--- a/sys/arch/arm/ep93xx/epclk.c       Sat Jun 04 22:14:00 2005 +0000
+++ b/sys/arch/arm/ep93xx/epclk.c       Sat Jun 04 22:37:51 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: epclk.c,v 1.5 2005/06/04 20:14:24 he Exp $     */
+/*     $NetBSD: epclk.c,v 1.6 2005/06/04 22:37:51 he Exp $     */
 
 /*
  * Copyright (c) 2004 Jesse Off
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: epclk.c,v 1.5 2005/06/04 20:14:24 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epclk.c,v 1.6 2005/06/04 22:37:51 he Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -183,7 +183,7 @@
  *     recalculate the intervals here, but that would be a pain.
  */
 void
-setstatclockrate(int hz)
+setstatclockrate(int newhz)
 {
 
        /* use hardclock */
diff -r 2a1f7c63a351 -r afa3ae1cc537 sys/arch/arm/ep93xx/epcom.c
--- a/sys/arch/arm/ep93xx/epcom.c       Sat Jun 04 22:14:00 2005 +0000
+++ b/sys/arch/arm/ep93xx/epcom.c       Sat Jun 04 22:37:51 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: epcom.c,v 1.2 2004/12/29 06:31:32 joff Exp $ */
+/*     $NetBSD: epcom.c,v 1.3 2005/06/04 22:37:51 he Exp $ */
 /*
  * Copyright (c) 1998, 1999, 2001, 2002, 2004 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: epcom.c,v 1.2 2004/12/29 06:31:32 joff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epcom.c,v 1.3 2005/06/04 22:37:51 he Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -957,7 +957,7 @@
        struct epcom_softc *sc;
        struct tty *tp;
 {
-       int (*rint) __P((int c, struct tty *tp)) = tp->t_linesw->l_rint;
+       int (*rint) __P((int, struct tty *)) = tp->t_linesw->l_rint;
        u_char *get, *end;
        u_int cc, scc;
        u_char sts;
diff -r 2a1f7c63a351 -r afa3ae1cc537 sys/arch/arm/ep93xx/epsoc.c
--- a/sys/arch/arm/ep93xx/epsoc.c       Sat Jun 04 22:14:00 2005 +0000
+++ b/sys/arch/arm/ep93xx/epsoc.c       Sat Jun 04 22:37:51 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: epsoc.c,v 1.1 2004/12/22 19:12:21 joff Exp $   */
+/*     $NetBSD: epsoc.c,v 1.2 2005/06/04 22:37:51 he Exp $     */
 
 /*
  * Copyright (c) 2004 Jesse Off
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: epsoc.c,v 1.1 2004/12/22 19:12:21 joff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epsoc.c,v 1.2 2005/06/04 22:37:51 he Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -84,7 +84,7 @@
        struct epsoc_softc      *sc;
        u_int64_t               fclk, pclk, hclk;
        u_int32_t               id, clkset1;
-       char                    *rev;
+       const char              *rev;
 
 
        sc = (struct epsoc_softc*) self;
diff -r 2a1f7c63a351 -r afa3ae1cc537 sys/arch/arm/s3c2xx0/s3c24x0_clk.c
--- a/sys/arch/arm/s3c2xx0/s3c24x0_clk.c        Sat Jun 04 22:14:00 2005 +0000
+++ b/sys/arch/arm/s3c2xx0/s3c24x0_clk.c        Sat Jun 04 22:37:51 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: s3c24x0_clk.c,v 1.3 2003/08/27 03:57:05 bsh Exp $ */
+/*     $NetBSD: s3c24x0_clk.c,v 1.4 2005/06/04 22:37:51 he Exp $ */
 
 /*
  * Copyright (c) 2003  Genetec corporation.  All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: s3c24x0_clk.c,v 1.3 2003/08/27 03:57:05 bsh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: s3c24x0_clk.c,v 1.4 2005/06/04 22:37:51 he Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -254,8 +254,7 @@
 }
 
 void
-setstatclockrate(hz)
-       int hz;
+setstatclockrate(int newhz)
 {
 }
 
diff -r 2a1f7c63a351 -r afa3ae1cc537 sys/arch/arm/s3c2xx0/s3c24x0_lcd.c
--- a/sys/arch/arm/s3c2xx0/s3c24x0_lcd.c        Sat Jun 04 22:14:00 2005 +0000
+++ b/sys/arch/arm/s3c2xx0/s3c24x0_lcd.c        Sat Jun 04 22:37:51 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: s3c24x0_lcd.c,v 1.1 2004/02/14 07:12:50 bsh Exp $ */
+/* $NetBSD: s3c24x0_lcd.c,v 1.2 2005/06/04 22:37:51 he Exp $ */
 
 /*
  * Copyright (c) 2004  Genetec Corporation.  All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: s3c24x0_lcd.c,v 1.1 2004/02/14 07:12:50 bsh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: s3c24x0_lcd.c,v 1.2 2005/06/04 22:37:51 he Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -522,8 +522,8 @@
 {
        struct s3c24x0_lcd_softc *sc = v;
        struct s3c24x0_lcd_screen *scr;
-       struct s3c24x0_wsscreen_descr *type =
-           (struct s3c24x0_wsscreen_descr *)_type;
+       const struct s3c24x0_wsscreen_descr *type =
+           (const struct s3c24x0_wsscreen_descr *)_type;
 
        int width, height;
 



Home | Main Index | Thread Index | Old Index