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 constify and adapt for newly enable...



details:   https://anonhg.NetBSD.org/src/rev/71df4cd6fc3f
branches:  trunk
changeset: 581576:71df4cd6fc3f
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Jun 02 17:07:30 2005 +0000

description:
constify and adapt for newly enabled warnings.

diffstat:

 sys/arch/powerpc/powerpc/db_memrw.c |  10 ++--
 sys/arch/powerpc/powerpc/openfirm.c |  80 ++++++++++++++++++------------------
 2 files changed, 45 insertions(+), 45 deletions(-)

diffs (truncated from 324 to 300 lines):

diff -r 7d2126817a55 -r 71df4cd6fc3f sys/arch/powerpc/powerpc/db_memrw.c
--- a/sys/arch/powerpc/powerpc/db_memrw.c       Thu Jun 02 17:01:43 2005 +0000
+++ b/sys/arch/powerpc/powerpc/db_memrw.c       Thu Jun 02 17:07:30 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_memrw.c,v 1.7 2003/09/27 04:44:42 matt Exp $        */
+/*     $NetBSD: db_memrw.c,v 1.8 2005/06/02 17:07:30 matt Exp $        */
 /*     $OpenBSD: db_memrw.c,v 1.2 1996/12/28 06:21:52 rahnds Exp $     */
 
 /* 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.7 2003/09/27 04:44:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.8 2005/06/02 17:07:30 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -78,17 +78,17 @@
  * Write bytes to kernel address space for debugger.
  */
 void
-db_write_bytes(vaddr_t addr, size_t size, char *data)
+db_write_bytes(vaddr_t addr, size_t size, const char *data)
 {
        char *dst = (char *)addr;
 
        if (size == 4) {
 
-               *((int*)dst) = *((int*)data);
+               *((int*)dst) = *((const int*)data);
 
        } else  if (size == 2) {
 
-               *((short*)dst) = *((short*)data);
+               *((short*)dst) = *((const short*)data);
 
        } else {
 
diff -r 7d2126817a55 -r 71df4cd6fc3f sys/arch/powerpc/powerpc/openfirm.c
--- a/sys/arch/powerpc/powerpc/openfirm.c       Thu Jun 02 17:01:43 2005 +0000
+++ b/sys/arch/powerpc/powerpc/openfirm.c       Thu Jun 02 17:07:30 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: openfirm.c,v 1.14 2003/09/27 04:44:42 matt Exp $       */
+/*     $NetBSD: openfirm.c,v 1.15 2005/06/02 17:07:30 matt Exp $       */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: openfirm.c,v 1.14 2003/09/27 04:44:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: openfirm.c,v 1.15 2005/06/02 17:07:30 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -53,7 +53,7 @@
 OF_peer(int phandle)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int phandle;
@@ -75,7 +75,7 @@
 OF_child(int phandle)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int phandle;
@@ -97,7 +97,7 @@
 OF_parent(int phandle)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int phandle;
@@ -119,7 +119,7 @@
 OF_instance_to_package(int ihandle)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int ihandle;
@@ -138,14 +138,14 @@
 }
 
 int
-OF_getproplen(int handle, char *prop)
+OF_getproplen(int handle, const char *prop)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int phandle;
-               char *prop;
+               const char *prop;
                int proplen;
        } args = {
                "getproplen",
@@ -162,14 +162,14 @@
 }
 
 int
-OF_getprop(int handle, char *prop, void *buf, int buflen)
+OF_getprop(int handle, const char *prop, void *buf, int buflen)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int phandle;
-               char *prop;
+               const char *prop;
                void *buf;
                int buflen;
                int size;
@@ -196,14 +196,14 @@
 }
 
 int
-OF_nextprop(int handle, char *prop, void *nextprop)
+OF_nextprop(int handle, const char *prop, void *nextprop)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int phandle;
-               char *prop;
+               const char *prop;
                char *buf;
                int flag;
        } args = {
@@ -223,13 +223,13 @@
 }
 
 int
-OF_finddevice(char *name)
+OF_finddevice(const char *name)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
-               char *device;
+               const char *device;
                int phandle;
        } args = {
                "finddevice",
@@ -248,7 +248,7 @@
 OF_instance_to_path(int ihandle, char *buf, int buflen)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int ihandle;
@@ -279,7 +279,7 @@
 OF_package_to_path(int phandle, char *buf, int buflen)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int phandle;
@@ -308,14 +308,14 @@
 }
 
 int
-OF_call_method(char *method, int ihandle, int nargs, int nreturns, ...)
+OF_call_method(const char *method, int ihandle, int nargs, int nreturns, ...)
 {
        va_list ap;
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
-               char *method;
+               const char *method;
                int ihandle;
                int args_n_results[12];
        } args = {
@@ -350,14 +350,14 @@
 }
 
 int
-OF_call_method_1(char *method, int ihandle, int nargs, ...)
+OF_call_method_1(const char *method, int ihandle, int nargs, ...)
 {
        va_list ap;
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
-               char *method;
+               const char *method;
                int ihandle;
                int args_n_results[8];
        } args = {
@@ -385,13 +385,13 @@
 }
 
 int
-OF_open(char *dname)
+OF_open(const char *dname)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
-               char *dname;
+               const char *dname;
                int handle;
        } args = {
                "open",
@@ -414,7 +414,7 @@
 OF_close(int handle)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int handle;
@@ -436,7 +436,7 @@
 OF_read(int handle, void *addr, int len)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int ihandle;
@@ -474,10 +474,10 @@
 }
 
 int
-OF_write(int handle, void *addr, int len)
+OF_write(int handle, const void *addr, int len)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int ihandle;
@@ -490,7 +490,7 @@
                1,
        };
        int l, act = 0;
-       char *p = addr;
+       const char *p = addr;
 
        ofw_stack();
        args.ihandle = handle;
@@ -511,7 +511,7 @@
 OF_seek(int handle, u_quad_t pos)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                int handle;
@@ -534,10 +534,10 @@
 }
 
 void
-OF_boot(char *bootspec)
+OF_boot(const char *bootspec)
 {
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                char *bootspec;
@@ -561,7 +561,7 @@
 OF_enter(void)
 {



Home | Main Index | Thread Index | Old Index