Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/tsarm Fix -Wcast-qual warnings, unfortunatel...



details:   https://anonhg.NetBSD.org/src/rev/3b22b939b1d7
branches:  trunk
changeset: 581757:3b22b939b1d7
user:      he <he%NetBSD.org@localhost>
date:      Sat Jun 04 22:40:03 2005 +0000

description:
Fix -Wcast-qual warnings, unfortunately using __UNCONST() for sysctl()
function parameters.

diffstat:

 sys/arch/evbarm/tsarm/tspld.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r ef0a3e7dec16 -r 3b22b939b1d7 sys/arch/evbarm/tsarm/tspld.c
--- a/sys/arch/evbarm/tsarm/tspld.c     Sat Jun 04 22:38:24 2005 +0000
+++ b/sys/arch/evbarm/tsarm/tspld.c     Sat Jun 04 22:40:03 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tspld.c,v 1.5 2005/02/24 03:52:22 joff Exp $   */
+/*     $NetBSD: tspld.c,v 1.6 2005/06/04 22:40:03 he Exp $     */
 
 /*-
  * Copyright (c) 2004 Jesse Off
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tspld.c,v 1.5 2005/02/24 03:52:22 joff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tspld.c,v 1.6 2005/06/04 22:40:03 he Exp $");
 
 #include <sys/param.h>
 #include <sys/sysctl.h>
@@ -72,8 +72,8 @@
        bus_space_handle_t      sc_wdogfeed_ioh;        
        bus_space_handle_t      sc_wdogctrl_ioh;        
        struct sysmon_wdog      sc_wdog;
-       unsigned char *         sc_com2mode;
-       unsigned char *         sc_model;
+       unsigned const char *   sc_com2mode;
+       unsigned const char *   sc_model;
        unsigned char           sc_pldrev[4];
        uint32_t                sc_rs485;
        uint32_t                sc_adc;
@@ -133,7 +133,7 @@
        if ((i = sysctl_createv(NULL, 0, NULL, NULL,
                                0, CTLTYPE_STRING, "boardmodel",
                                SYSCTL_DESCR("Technologic Systems board model"),
-                               NULL, 0, sc->sc_model, 0,
+                               NULL, 0, __UNCONST(sc->sc_model), 0,
                                CTL_HW, node->sysctl_num, CTL_CREATE, CTL_EOL))
                                != 0) {
                 printf("%s: could not create sysctl\n", 
@@ -216,7 +216,7 @@
        if ((i = sysctl_createv(NULL, 0, NULL, NULL,
                                0, CTLTYPE_STRING, "com2_mode",
                                SYSCTL_DESCR("line driver type for COM2"),
-                               NULL, 0, sc->sc_com2mode, 0,
+                               NULL, 0, __UNCONST(sc->sc_com2mode), 0,
                                CTL_HW, node->sysctl_num, CTL_CREATE, CTL_EOL))
                                != 0) {
                 printf("%s: could not create sysctl\n", 



Home | Main Index | Thread Index | Old Index