Source-Changes-HG archive

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

[src/trunk]: src/sys quell cast-qual and shadow warnings



details:   https://anonhg.NetBSD.org/src/rev/8f2ae26b4d47
branches:  trunk
changeset: 581447:8f2ae26b4d47
user:      drochner <drochner%NetBSD.org@localhost>
date:      Wed Jun 01 18:07:04 2005 +0000

description:
quell cast-qual and shadow warnings

diffstat:

 sys/dev/ic/hscx.c                |   5 ++---
 sys/dev/ic/isic_l1fsm.c          |  12 ++++++------
 sys/dev/pci/ifpci2.c             |  12 ++++++------
 sys/dev/pci/isic_pci.c           |   8 ++++----
 sys/dev/pci/isic_pci_elsa_qs1p.c |  10 +++++-----
 sys/netisdn/i4b_i4bdrv.c         |   5 ++---
 sys/netisdn/i4b_l2.h             |   8 ++++----
 sys/netisdn/i4b_l2fsm.c          |  12 ++++++------
 sys/netisdn/i4b_l3.h             |   4 ++--
 sys/netisdn/i4b_l3fsm.c          |  12 ++++++------
 sys/netisdn/i4b_l4.c             |  14 +++++++-------
 sys/netisdn/i4b_lme.c            |   8 ++++----
 sys/netisdn/i4b_q931.c           |   6 +++---
 13 files changed, 57 insertions(+), 59 deletions(-)

diffs (truncated from 497 to 300 lines):

diff -r 4dbc7bf560a1 -r 8f2ae26b4d47 sys/dev/ic/hscx.c
--- a/sys/dev/ic/hscx.c Wed Jun 01 18:03:50 2005 +0000
+++ b/sys/dev/ic/hscx.c Wed Jun 01 18:07:04 2005 +0000
@@ -27,14 +27,14 @@
  *     i4b - Siemens HSCX chip (B-channel) handling
  *     --------------------------------------------
  *
- *     $Id: hscx.c,v 1.10 2005/02/27 00:27:01 perry Exp $
+ *     $Id: hscx.c,v 1.11 2005/06/01 18:16:22 drochner Exp $
  *
  *      last edit-date: [Fri Jan  5 11:36:10 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hscx.c,v 1.10 2005/02/27 00:27:01 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hscx.c,v 1.11 2005/06/01 18:16:22 drochner Exp $");
 
 #include <sys/param.h>
 #if defined(__FreeBSD_version) && __FreeBSD_version >= 300001
@@ -344,7 +344,6 @@
                 * a look at isic_bchannel_start() in i4b_bchan.c !
                 */
 
-               int activity = -1;
                int len;
                int nextlen;
 
diff -r 4dbc7bf560a1 -r 8f2ae26b4d47 sys/dev/ic/isic_l1fsm.c
--- a/sys/dev/ic/isic_l1fsm.c   Wed Jun 01 18:03:50 2005 +0000
+++ b/sys/dev/ic/isic_l1fsm.c   Wed Jun 01 18:07:04 2005 +0000
@@ -27,14 +27,14 @@
  *     i4b_l1fsm.c - isdn4bsd layer 1 I.430 state machine
  *     --------------------------------------------------
  *
- *     $Id: isic_l1fsm.c,v 1.10 2005/02/27 00:27:01 perry Exp $
+ *     $Id: isic_l1fsm.c,v 1.11 2005/06/01 18:16:22 drochner Exp $
  *
  *      last edit-date: [Fri Jan  5 11:36:11 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_l1fsm.c,v 1.10 2005/02/27 00:27:01 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_l1fsm.c,v 1.11 2005/06/01 18:16:22 drochner Exp $");
 
 #include <sys/param.h>
 #if defined(__FreeBSD__) && __FreeBSD__ >= 3
@@ -87,7 +87,7 @@
 #include "nisacsx.h"
 
 #if DO_I4B_DEBUG
-static char *state_text[N_STATES] = {
+static const char *state_text[N_STATES] = {
        "F3 Deactivated",
        "F4 Awaiting Signal",
        "F5 Identifying Input",
@@ -97,7 +97,7 @@
        "Illegal State"
 };
 
-static char *event_text[N_EVENTS] = {
+static const char *event_text[N_EVENTS] = {
        "EV_PHAR PH_ACT_REQ",
        "EV_T3 Timer 3 expired",
        "EV_INFO0 INFO0 received",
@@ -539,9 +539,9 @@
 /*---------------------------------------------------------------------------*
  *     return pointer to current state description
  *---------------------------------------------------------------------------*/
-char *
+const char *
 isic_printstate(struct isic_softc *sc)
 {
-       return((char *) state_text[sc->sc_I430state]);
+       return(state_text[sc->sc_I430state]);
 }
 #endif
diff -r 4dbc7bf560a1 -r 8f2ae26b4d47 sys/dev/pci/ifpci2.c
--- a/sys/dev/pci/ifpci2.c      Wed Jun 01 18:03:50 2005 +0000
+++ b/sys/dev/pci/ifpci2.c      Wed Jun 01 18:07:04 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ifpci2.c,v 1.5 2005/02/27 00:27:33 perry Exp $     */
+/* $NetBSD: ifpci2.c,v 1.6 2005/06/01 18:16:22 drochner Exp $  */
 /*
  *   Copyright (c) 1999 Gary Jennejohn. All rights reserved.
  *
@@ -36,14 +36,14 @@
  *     Fritz!Card PCI driver
  *     ------------------------------------------------
  *
- *     $Id: ifpci2.c,v 1.5 2005/02/27 00:27:33 perry Exp $
+ *     $Id: ifpci2.c,v 1.6 2005/06/01 18:16:22 drochner Exp $
  *
  *      last edit-date: [Fri Jan  5 11:38:58 2001]
  *
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ifpci2.c,v 1.5 2005/02/27 00:27:33 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ifpci2.c,v 1.6 2005/06/01 18:16:22 drochner Exp $");
 
 
 #include <sys/param.h>
@@ -453,7 +453,7 @@
                        bus_space_write_4(sc->sc_maps[0].t, sc->sc_maps[0].h,  ISACSX_INDEX, 0);
                        /* evidently each byte must be written as a long */
                        for (i = 0; i < size; i++)
-                               bus_space_write_4(sc->sc_maps[0].t, sc->sc_maps[0].h,  ISACSX_DATA, ((unsigned char *)buf)[i]);
+                               bus_space_write_4(sc->sc_maps[0].t, sc->sc_maps[0].h,  ISACSX_DATA, ((const unsigned char *)buf)[i]);
                        break;
                case ISIC_WHAT_HSCXA:
                        hscx_write_fifo(0, buf, size, sc);
@@ -467,7 +467,7 @@
 static void
 hscx_write_fifo(int chan, const void *buf, size_t len, struct isic_softc *sc)
 {
-       u_int32_t *ip;
+       const u_int32_t *ip;
        size_t cnt;
        int dataoff;
        l1_bchan_state_t *Bchan = &sc->sc_chan[chan];
@@ -488,7 +488,7 @@
        AVMA1PPSETCMDLONG(cnt);
        hscx_write_reg(chan, cnt, sc);
 
-       ip = (u_int32_t *)buf;
+       ip = (const u_int32_t *)buf;
        cnt = 0;
        while (cnt < len)
        {
diff -r 4dbc7bf560a1 -r 8f2ae26b4d47 sys/dev/pci/isic_pci.c
--- a/sys/dev/pci/isic_pci.c    Wed Jun 01 18:03:50 2005 +0000
+++ b/sys/dev/pci/isic_pci.c    Wed Jun 01 18:07:04 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isic_pci.c,v 1.23 2005/02/27 00:27:33 perry Exp $ */
+/* $NetBSD: isic_pci.c,v 1.24 2005/06/01 18:16:22 drochner Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_pci.c,v 1.23 2005/02/27 00:27:33 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_pci.c,v 1.24 2005/06/01 18:16:22 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/errno.h>
@@ -177,7 +177,7 @@
        pci_intr_handle_t ih;
        const char *intrstr;
 
-       static char *ISACversion[] = {
+       static const char *ISACversion[] = {
                "2085 Version A1/A2 or 2086/2186 Version 1.1",
                "2085 Version B1",
                "2085 Version B2",
@@ -185,7 +185,7 @@
                "Unknown Version"
        };
 
-       static char *HSCXversion[] = {
+       static const char *HSCXversion[] = {
                "82525 Version A1",
                "Unknown (0x01)",
                "82525 Version A2",
diff -r 4dbc7bf560a1 -r 8f2ae26b4d47 sys/dev/pci/isic_pci_elsa_qs1p.c
--- a/sys/dev/pci/isic_pci_elsa_qs1p.c  Wed Jun 01 18:03:50 2005 +0000
+++ b/sys/dev/pci/isic_pci_elsa_qs1p.c  Wed Jun 01 18:07:04 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isic_pci_elsa_qs1p.c,v 1.13 2005/02/27 00:27:33 perry Exp $ */
+/* $NetBSD: isic_pci_elsa_qs1p.c,v 1.14 2005/06/01 18:16:22 drochner Exp $ */
 
 /*
  * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
@@ -32,7 +32,7 @@
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isic_pci_elsa_qs1p.c,v 1.13 2005/02/27 00:27:33 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isic_pci_elsa_qs1p.c,v 1.14 2005/06/01 18:16:22 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -130,15 +130,15 @@
        switch (what) {
                case ISIC_WHAT_ISAC:
                        bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_ISAC_OFF);
-                       bus_space_write_multi_1(t, h, ELSA_OFF_RW, (u_int8_t*)buf, size);
+                       bus_space_write_multi_1(t, h, ELSA_OFF_RW, buf, size);
                        break;
                case ISIC_WHAT_HSCXA:
                        bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_HSCXA_OFF);
-                       bus_space_write_multi_1(t, h, ELSA_OFF_RW, (u_int8_t*)buf, size);
+                       bus_space_write_multi_1(t, h, ELSA_OFF_RW, buf, size);
                        break;
                case ISIC_WHAT_HSCXB:
                        bus_space_write_1(t, h, ELSA_OFF_ALE, IPAC_HSCXB_OFF);
-                       bus_space_write_multi_1(t, h, ELSA_OFF_RW, (u_int8_t*)buf, size);
+                       bus_space_write_multi_1(t, h, ELSA_OFF_RW, buf, size);
                        break;
        }
 }
diff -r 4dbc7bf560a1 -r 8f2ae26b4d47 sys/netisdn/i4b_i4bdrv.c
--- a/sys/netisdn/i4b_i4bdrv.c  Wed Jun 01 18:03:50 2005 +0000
+++ b/sys/netisdn/i4b_i4bdrv.c  Wed Jun 01 18:07:04 2005 +0000
@@ -27,7 +27,7 @@
  *     i4b_i4bdrv.c - i4b userland interface driver
  *     --------------------------------------------
  *
- *     $Id: i4b_i4bdrv.c,v 1.26 2005/02/26 22:39:49 perry Exp $
+ *     $Id: i4b_i4bdrv.c,v 1.27 2005/06/01 18:07:04 drochner Exp $
  *
  * $FreeBSD$
  *
@@ -36,7 +36,7 @@
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i4b_i4bdrv.c,v 1.26 2005/02/26 22:39:49 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i4b_i4bdrv.c,v 1.27 2005/06/01 18:07:04 drochner Exp $");
 
 #include "isdn.h"
 
@@ -543,7 +543,6 @@
                case I4B_CTRL_INFO_REQ:
                {
                        msg_ctrl_info_req_t *mcir;
-                       struct isdn_l3_driver *d;
                        int isdnif;
 
                        mcir = (msg_ctrl_info_req_t *)data;
diff -r 4dbc7bf560a1 -r 8f2ae26b4d47 sys/netisdn/i4b_l2.h
--- a/sys/netisdn/i4b_l2.h      Wed Jun 01 18:03:50 2005 +0000
+++ b/sys/netisdn/i4b_l2.h      Wed Jun 01 18:07:04 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i4b_l2.h,v 1.10 2005/02/26 22:39:49 perry Exp $ */
+/* $NetBSD: i4b_l2.h,v 1.11 2005/06/01 18:07:04 drochner Exp $ */
 
 /*
  * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved.
@@ -29,7 +29,7 @@
  *     i4b_l2.h - ISDN layer 2 (Q.921) definitions
  *     ---------------------------------------------
  *
- *     $Id: i4b_l2.h,v 1.10 2005/02/26 22:39:49 perry Exp $
+ *     $Id: i4b_l2.h,v 1.11 2005/06/01 18:07:04 drochner Exp $
  *
  * $FreeBSD$
  *
@@ -314,13 +314,13 @@
 extern int i4b_l2_nr_ok ( int nr, int va, int vs );
 extern void i4b_make_rand_ri ( l2_softc_t *l2sc );
 extern void i4b_mdl_assign_ind ( l2_softc_t *l2sc );
-extern void i4b_mdl_error_ind ( l2_softc_t *l2sc, char *where, int errorcode );
+extern void i4b_mdl_error_ind ( l2_softc_t *l2sc, const char *where, int errorcode );
 extern void i4b_next_l2state ( l2_softc_t *l2sc, struct isdn_l3_driver *drv, int event );
 extern void i4b_nr_error_recovery ( l2_softc_t *l2sc );
 extern int i4b_ph_activate_ind ( l2_softc_t* );
 extern int i4b_ph_deactivate_ind ( l2_softc_t* );
 extern void i4b_print_frame ( int len, u_char *buf );
-extern char *i4b_print_l2state ( l2_softc_t *l2sc );
+extern const char *i4b_print_l2state ( l2_softc_t *l2sc );
 extern void i4b_print_l2var ( l2_softc_t *l2sc );
 extern void i4b_rxd_ack(l2_softc_t *l2sc, struct isdn_l3_driver *drv, int nr);
 extern void i4b_rxd_i_frame ( l2_softc_t *, struct isdn_l3_driver *drv, struct mbuf *m );
diff -r 4dbc7bf560a1 -r 8f2ae26b4d47 sys/netisdn/i4b_l2fsm.c
--- a/sys/netisdn/i4b_l2fsm.c   Wed Jun 01 18:03:50 2005 +0000
+++ b/sys/netisdn/i4b_l2fsm.c   Wed Jun 01 18:07:04 2005 +0000
@@ -27,7 +27,7 @@
  *     i4b_l2fsm.c - layer 2 FSM
  *     -------------------------
  *
- *     $Id: i4b_l2fsm.c,v 1.7 2005/02/26 22:39:49 perry Exp $
+ *     $Id: i4b_l2fsm.c,v 1.8 2005/06/01 18:07:04 drochner Exp $
  *
  * $FreeBSD$
  *
@@ -36,7 +36,7 @@
  *---------------------------------------------------------------------------*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i4b_l2fsm.c,v 1.7 2005/02/26 22:39:49 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i4b_l2fsm.c,v 1.8 2005/06/01 18:07:04 drochner Exp $");
 
 #ifdef __FreeBSD__
 #include "i4bq921.h"
@@ -75,7 +75,7 @@
 
 
 #if DO_I4B_DEBUG
-static char *l2state_text[N_STATES] = {
+static const char *l2state_text[N_STATES] = {
        "ST_TEI_UNAS",
        "ST_ASG_AW_TEI",
        "ST_EST_AW_TEI",
@@ -90,7 +90,7 @@
        "Illegal State"
 };



Home | Main Index | Thread Index | Old Index