Fix some easy, global, lint warnings. In most cases, this means

making some local variables static. In a couple of cases, this means
removing an unused variable.
This commit is contained in:
Mark Murray 2003-04-30 12:57:40 +00:00
parent 01b63a1009
commit 51da11a27a
28 changed files with 28 additions and 32 deletions

View File

@ -97,8 +97,6 @@ SYSINIT(configure2, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL);
/* SI_ORDER_MIDDLE is hookable */
SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL);
device_t nexus_dev;
/*
* Determine i/o configuration for a machine.
*/

View File

@ -205,7 +205,7 @@ static kbd_get_state_t atkbd_get_state;
static kbd_set_state_t atkbd_set_state;
static kbd_poll_mode_t atkbd_poll;
keyboard_switch_t atkbdsw = {
static keyboard_switch_t atkbdsw = {
atkbd_probe,
atkbd_init,
atkbd_term,

View File

@ -50,7 +50,7 @@ typedef struct {
void *ih;
} atkbd_softc_t;
devclass_t atkbd_devclass;
static devclass_t atkbd_devclass;
static void atkbdidentify(driver_t *driver, device_t dev);
static int atkbdprobe(device_t dev);

View File

@ -50,7 +50,7 @@ typedef struct {
void *ih;
} atkbd_softc_t;
devclass_t atkbd_devclass;
static devclass_t atkbd_devclass;
static void atkbdidentify(driver_t *driver, device_t dev);
static int atkbdprobe(device_t dev);

View File

@ -56,7 +56,7 @@ typedef struct atkbdc_device {
} atkbdc_device_t;
/* kbdc */
devclass_t atkbdc_devclass;
static devclass_t atkbdc_devclass;
static int atkbdc_probe(device_t dev);
static int atkbdc_attach(device_t dev);

View File

@ -56,7 +56,7 @@ typedef struct atkbdc_device {
} atkbdc_device_t;
/* kbdc */
devclass_t atkbdc_devclass;
static devclass_t atkbdc_devclass;
static int atkbdc_probe(device_t dev);
static int atkbdc_attach(device_t dev);

View File

@ -164,7 +164,7 @@ struct psm_softc { /* Driver status information */
dev_t dev;
dev_t bdev;
};
devclass_t psm_devclass;
static devclass_t psm_devclass;
#define PSM_SOFTC(unit) ((struct psm_softc*)devclass_get_softc(psm_devclass, unit))
/* driver state flags (state) */

View File

@ -205,7 +205,7 @@ static kbd_get_state_t atkbd_get_state;
static kbd_set_state_t atkbd_set_state;
static kbd_poll_mode_t atkbd_poll;
keyboard_switch_t atkbdsw = {
static keyboard_switch_t atkbdsw = {
atkbd_probe,
atkbd_init,
atkbd_term,

View File

@ -60,7 +60,7 @@
#define DEVTOSOFTC(dev) ((struct ppc_data *)device_get_softc(dev))
devclass_t ppc_devclass;
static devclass_t ppc_devclass;
static int ppc_probe(device_t dev);
static int ppc_attach(device_t dev);

View File

@ -327,7 +327,7 @@ static struct cdevsw sio_cdevsw = {
.d_kqfilter = ttykqfilter,
};
int comconsole = -1;
static int comconsole = -1;
static volatile speed_t comdefaultrate = CONSPEED;
static u_long comdefaultrclk = DEFAULT_RCLK;
SYSCTL_ULONG(_machdep, OID_AUTO, conrclk, CTLFLAG_RW, &comdefaultrclk, 0, "");

View File

@ -135,7 +135,7 @@ g_event_procbody(void)
}
}
struct kproc_desc g_event_kp = {
static struct kproc_desc g_event_kp = {
"g_event",
g_event_procbody,
&g_event_proc,

View File

@ -97,8 +97,6 @@ SYSINIT(configure2, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL);
/* SI_ORDER_MIDDLE is hookable */
SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL);
device_t nexus_dev;
/*
* Determine i/o configuration for a machine.
*/

View File

@ -50,7 +50,7 @@ typedef struct {
void *ih;
} atkbd_softc_t;
devclass_t atkbd_devclass;
static devclass_t atkbd_devclass;
static void atkbdidentify(driver_t *driver, device_t dev);
static int atkbdprobe(device_t dev);

View File

@ -56,7 +56,7 @@ typedef struct atkbdc_device {
} atkbdc_device_t;
/* kbdc */
devclass_t atkbdc_devclass;
static devclass_t atkbdc_devclass;
static int atkbdc_probe(device_t dev);
static int atkbdc_attach(device_t dev);

View File

@ -60,7 +60,7 @@
#define DEVTOSOFTC(dev) ((struct ppc_data *)device_get_softc(dev))
devclass_t ppc_devclass;
static devclass_t ppc_devclass;
static int ppc_probe(device_t dev);
static int ppc_attach(device_t dev);

View File

@ -164,7 +164,7 @@ struct psm_softc { /* Driver status information */
dev_t dev;
dev_t bdev;
};
devclass_t psm_devclass;
static devclass_t psm_devclass;
#define PSM_SOFTC(unit) ((struct psm_softc*)devclass_get_softc(psm_devclass, unit))
/* driver state flags (state) */

View File

@ -75,7 +75,7 @@
static MALLOC_DEFINE(M_FILEDESC, "file desc", "Open file descriptor table");
static MALLOC_DEFINE(M_SIGIO, "sigio", "sigio structures");
uma_zone_t file_zone;
static uma_zone_t file_zone;
static d_open_t fdopen;
#define NUMFDESC 64

View File

@ -83,7 +83,7 @@ struct fork_args {
};
#endif
int forksleep; /* Place for fork1() to sleep on. */
static int forksleep; /* Place for fork1() to sleep on. */
/*
* MPSAFE

View File

@ -231,7 +231,7 @@ SYSCTL_INT(_regression, OID_AUTO, securelevel_nonmonotonic, CTLFLAG_RW,
#endif
int securelevel = -1;
struct mtx securelevel_mtx;
static struct mtx securelevel_mtx;
MTX_SYSINIT(securelevel_lock, &securelevel_mtx, "securelevel mutex lock",
MTX_DEF);

View File

@ -65,7 +65,7 @@ struct ke_sched {
int ske_cpticks; /* (j) Ticks of cpu time. */
};
struct ke_sched ke_sched;
static struct ke_sched ke_sched;
struct ke_sched *kse0_sched = &ke_sched;
struct kg_sched *ksegrp0_sched = NULL;

View File

@ -234,7 +234,7 @@ struct dev_event_info
TAILQ_HEAD(devq, dev_event_info);
struct dev_softc
static struct dev_softc
{
int inuse;
int nonblock;
@ -245,7 +245,7 @@ struct dev_softc
struct proc *async_proc;
} devsoftc;
dev_t devctl_dev;
static dev_t devctl_dev;
static void
devinit(void)

View File

@ -228,7 +228,7 @@ struct mb_lstmngr {
};
static struct mb_lstmngr mb_list_mbuf, mb_list_clust;
static struct mtx mbuf_gen, mbuf_pcpu[NCPU];
u_int *cl_refcntmap;
static u_int *cl_refcntmap;
/*
* Local macros for internal allocator structure manipulations.

View File

@ -67,7 +67,7 @@ void (*aio_swake)(struct socket *, struct sockbuf *);
*/
u_long sb_max = SB_MAX;
u_long sb_max_adj =
static u_long sb_max_adj =
SB_MAX * MCLBYTES / (MSIZE + MCLBYTES); /* adjusted sb_max */
static u_long sb_efficiency = 8; /* parameter for sbreserve() */

View File

@ -67,7 +67,7 @@ void (*aio_swake)(struct socket *, struct sockbuf *);
*/
u_long sb_max = SB_MAX;
u_long sb_max_adj =
static u_long sb_max_adj =
SB_MAX * MCLBYTES / (MSIZE + MCLBYTES); /* adjusted sb_max */
static u_long sb_efficiency = 8; /* parameter for sbreserve() */

View File

@ -103,7 +103,7 @@ struct ifindex_entry *ifindex_table = NULL;
int ifqmaxlen = IFQ_MAXLEN;
struct ifnethead ifnet; /* depend on static init XXX */
struct mtx ifnet_lock;
int if_cloners_count;
static int if_cloners_count;
LIST_HEAD(, if_clone) if_cloners = LIST_HEAD_INITIALIZER(if_cloners);
static int if_indexlim = 8;

View File

@ -102,7 +102,7 @@ int (*ng_ether_output_p)(struct ifnet *ifp, struct mbuf **mp);
void (*ng_ether_attach_p)(struct ifnet *ifp);
void (*ng_ether_detach_p)(struct ifnet *ifp);
void (*vlan_input_p)(struct ifnet *, struct mbuf *);
static void (*vlan_input_p)(struct ifnet *, struct mbuf *);
/* bridge support */
int do_bridge;

View File

@ -104,7 +104,7 @@ int dopersistence = 0;
#ifdef DEBUG
#include <sys/sysctl.h>
SYSCTL_INT(_debug, OID_AUTO, dopersistence, CTLFLAG_RW, &dopersistence, 0, "");
int snapdebug = 0;
static int snapdebug = 0;
SYSCTL_INT(_debug, OID_AUTO, snapdebug, CTLFLAG_RW, &snapdebug, 0, "");
int collectsnapstats = 0;
SYSCTL_INT(_debug, OID_AUTO, collectsnapstats, CTLFLAG_RW, &collectsnapstats,

View File

@ -68,9 +68,9 @@
#include <ufs/ufs/ufs_extern.h>
#ifdef DIAGNOSTIC
int dirchk = 1;
static int dirchk = 1;
#else
int dirchk = 0;
static int dirchk = 0;
#endif
SYSCTL_INT(_debug, OID_AUTO, dircheck, CTLFLAG_RW, &dirchk, 0, "");