Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/powerpc Appease -Wcast-qual for the IBM4XX ...



details:   https://anonhg.NetBSD.org/src/rev/5bc4c8498797
branches:  trunk
changeset: 581619:5bc4c8498797
user:      scw <scw%NetBSD.org@localhost>
date:      Fri Jun 03 11:40:25 2005 +0000

description:
Appease -Wcast-qual for the IBM4XX case.

diffstat:

 sys/arch/powerpc/powerpc/db_interface.c |  39 ++++++++++++++++++--------------
 1 files changed, 22 insertions(+), 17 deletions(-)

diffs (114 lines):

diff -r 3ab77938518e -r 5bc4c8498797 sys/arch/powerpc/powerpc/db_interface.c
--- a/sys/arch/powerpc/powerpc/db_interface.c   Fri Jun 03 11:38:56 2005 +0000
+++ b/sys/arch/powerpc/powerpc/db_interface.c   Fri Jun 03 11:40:25 2005 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: db_interface.c,v 1.33 2003/12/17 04:04:40 simonb Exp $ */
+/*     $NetBSD: db_interface.c,v 1.34 2005/06/03 11:40:25 scw Exp $ */
 /*     $OpenBSD: db_interface.c,v 1.2 1996/12/28 06:21:50 rahnds Exp $ */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.33 2003/12/17 04:04:40 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.34 2005/06/03 11:40:25 scw Exp $");
 
 #define USERACC
 
@@ -47,16 +47,16 @@
 void ddb_trap(void);                           /* Call into trap_subr.S */
 int ddb_trap_glue(struct trapframe *);         /* Called from trap_subr.S */
 #ifdef PPC_IBM4XX
-static void db_ppc4xx_ctx(db_expr_t, int, db_expr_t, char *);
-static void db_ppc4xx_pv(db_expr_t, int, db_expr_t, char *);
-static void db_ppc4xx_reset(db_expr_t, int, db_expr_t, char *);
-static void db_ppc4xx_tf(db_expr_t, int, db_expr_t, char *);
-static void db_ppc4xx_dumptlb(db_expr_t, int, db_expr_t, char *);
-static void db_ppc4xx_dcr(db_expr_t, int, db_expr_t, char *);
+static void db_ppc4xx_ctx(db_expr_t, int, db_expr_t, const char *);
+static void db_ppc4xx_pv(db_expr_t, int, db_expr_t, const char *);
+static void db_ppc4xx_reset(db_expr_t, int, db_expr_t, const char *);
+static void db_ppc4xx_tf(db_expr_t, int, db_expr_t, const char *);
+static void db_ppc4xx_dumptlb(db_expr_t, int, db_expr_t, const char *);
+static void db_ppc4xx_dcr(db_expr_t, int, db_expr_t, const char *);
 static db_expr_t db_ppc4xx_mfdcr(db_expr_t);
 static void db_ppc4xx_mtdcr(db_expr_t, db_expr_t);
 #ifdef USERACC
-static void db_ppc4xx_useracc(db_expr_t, int, db_expr_t, char *);
+static void db_ppc4xx_useracc(db_expr_t, int, db_expr_t, const char *);
 #endif
 #endif /* PPC_IBM4XX */
 
@@ -205,7 +205,7 @@
 };
 
 static void
-db_ppc4xx_ctx(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
+db_ppc4xx_ctx(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
 {
        struct proc *p;
 
@@ -223,7 +223,7 @@
 }
 
 static void
-db_ppc4xx_pv(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
+db_ppc4xx_pv(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
 {
        struct pv_entry {
                struct pv_entry *pv_next;       /* Linked list of mappings */
@@ -247,14 +247,15 @@
 }
 
 static void
-db_ppc4xx_reset(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
+db_ppc4xx_reset(db_expr_t addr, int have_addr, db_expr_t count,
+    const char *modif)
 {
        printf("Reseting...\n");
        ppc4xx_reset();
 }
 
 static void
-db_ppc4xx_tf(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
+db_ppc4xx_tf(db_expr_t addr, int have_addr, db_expr_t count, const char *modif)
 {
        struct trapframe *f;
 
@@ -310,7 +311,8 @@
 };
 
 static void
-db_ppc4xx_dumptlb(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
+db_ppc4xx_dumptlb(db_expr_t addr, int have_addr, db_expr_t count,
+    const char *modif)
 {
        int i, zone, tlbsize;
        u_int zpr, pid, opid, msr;
@@ -365,7 +367,8 @@
 }
 
 static void
-db_ppc4xx_dcr(db_expr_t address, int have_addr, db_expr_t count, char *modif)
+db_ppc4xx_dcr(db_expr_t address, int have_addr, db_expr_t count,
+    const char *modif)
 {
        db_expr_t new_value;
        db_expr_t addr;
@@ -439,7 +442,8 @@
 
 #ifdef USERACC
 static void
-db_ppc4xx_useracc(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
+db_ppc4xx_useracc(db_expr_t addr, int have_addr, db_expr_t count,
+    const char *modif)
 {
        static paddr_t oldaddr = -1;
        int instr = 0;
@@ -456,7 +460,8 @@
        }
        addr &= ~0x3; /* align */
        {
-               char c, *cp = modif;
+               const char *cp = modif;
+               char c;
                while ((c = *cp++) != 0)
                        if (c == 'i')
                                instr = 1;



Home | Main Index | Thread Index | Old Index