Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/a82d3e4aa187
branches:  trunk
changeset: 581765:a82d3e4aa187
user:      he <he%NetBSD.org@localhost>
date:      Sun Jun 05 09:08:48 2005 +0000

description:
Adapt to compiling with -Wcast-qual by sprinkling consts around.

diffstat:

 sys/arch/luna68k/luna68k/autoconf.c |  11 ++++++-----
 sys/arch/luna68k/luna68k/disksubr.c |   8 ++++----
 sys/arch/luna68k/luna68k/machdep.c  |  10 +++++-----
 sys/arch/luna68k/luna68k/trap.c     |   6 +++---
 4 files changed, 18 insertions(+), 17 deletions(-)

diffs (154 lines):

diff -r 3fa7c906f0b8 -r a82d3e4aa187 sys/arch/luna68k/luna68k/autoconf.c
--- a/sys/arch/luna68k/luna68k/autoconf.c       Sun Jun 05 09:04:49 2005 +0000
+++ b/sys/arch/luna68k/luna68k/autoconf.c       Sun Jun 05 09:08:48 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.4 2004/10/23 17:07:39 thorpej Exp $ */
+/* $NetBSD: autoconf.c,v 1.5 2005/06/05 09:08:48 he Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.4 2004/10/23 17:07:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.5 2005/06/05 09:08:48 he Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -52,7 +52,7 @@
 
 #include <luna68k/luna68k/isr.h>
 
-static struct device *find_dev_byname __P((char *));
+static struct device *find_dev_byname __P((const char *));
 
 /*
  * Determine mass storage and memory configuration for a machine.
@@ -75,7 +75,8 @@
 {
 #if 1 /* XXX to be reworked with helps of 2nd stage loaders XXX */
        int i;
-       char *devname, *cp;
+       const char *devname;
+       char *cp;
        extern char bootarg[64];
 
        cp = bootarg;
@@ -100,7 +101,7 @@
 
 static struct device *
 find_dev_byname(name)
-       char *name;
+       const char *name;
 {
        struct device *dv;
 
diff -r 3fa7c906f0b8 -r a82d3e4aa187 sys/arch/luna68k/luna68k/disksubr.c
--- a/sys/arch/luna68k/luna68k/disksubr.c       Sun Jun 05 09:04:49 2005 +0000
+++ b/sys/arch/luna68k/luna68k/disksubr.c       Sun Jun 05 09:08:48 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.17 2003/12/10 12:06:25 agc Exp $ */
+/* $NetBSD: disksubr.c,v 1.18 2005/06/05 09:08:48 he Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -103,7 +103,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.17 2003/12/10 12:06:25 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.18 2005/06/05 09:08:48 he Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -158,7 +158,7 @@
 #error "Default value of LABELSECTOR no longer zero?"
 #endif
 
-static char *disklabel_om_to_bsd __P((char *, struct disklabel *));
+static const char *disklabel_om_to_bsd __P((char *, struct disklabel *));
 static int disklabel_bsd_to_om __P((struct disklabel *, char *));
 
 /*
@@ -401,7 +401,7 @@
  *
  * The BSD label is cleared out before this is called.
  */
-static char *
+static const char *
 disklabel_om_to_bsd(cp, lp)
        char *cp;
        struct disklabel *lp;
diff -r 3fa7c906f0b8 -r a82d3e4aa187 sys/arch/luna68k/luna68k/machdep.c
--- a/sys/arch/luna68k/luna68k/machdep.c        Sun Jun 05 09:04:49 2005 +0000
+++ b/sys/arch/luna68k/luna68k/machdep.c        Sun Jun 05 09:08:48 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.40 2005/04/25 15:02:05 lukem Exp $ */
+/* $NetBSD: machdep.c,v 1.41 2005/06/05 09:08:48 he Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.40 2005/04/25 15:02:05 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.41 2005/06/05 09:08:48 he Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -336,7 +336,7 @@
 identifycpu()
 {
        extern int cputype;
-       char *cpu;
+       const char *cpu;
 
        bzero(cpu_model, sizeof(cpu_model));
        switch (cputype) {
@@ -737,7 +737,7 @@
        return (0);
 }
 
-void luna68k_abort __P((char *));
+void luna68k_abort __P((const char *));
 
 static int innmihand;  /* simple mutex */
 
@@ -766,7 +766,7 @@
  */
 void
 luna68k_abort(cp)
-       char *cp;
+       const char *cp;
 {
 #ifdef DDB
        printf("%s\n", cp);
diff -r 3fa7c906f0b8 -r a82d3e4aa187 sys/arch/luna68k/luna68k/trap.c
--- a/sys/arch/luna68k/luna68k/trap.c   Sun Jun 05 09:04:49 2005 +0000
+++ b/sys/arch/luna68k/luna68k/trap.c   Sun Jun 05 09:08:48 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.31 2004/08/28 17:53:01 jdolecek Exp $ */
+/* $NetBSD: trap.c,v 1.32 2005/06/05 09:08:48 he Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -78,7 +78,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.31 2004/08/28 17:53:01 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.32 2005/06/05 09:08:48 he Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -124,7 +124,7 @@
 
 int    astpending;
 
-char   *trap_type[] = {
+const char *trap_type[] = {
        "Bus error",
        "Address error",
        "Illegal instruction",



Home | Main Index | Thread Index | Old Index