Fix gcc -Wall warnings.
This commit is contained in:
parent
e8a8a6298c
commit
1c86bef3bc
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: aha.c,v 1.8 1996/04/25 18:54:45 is Exp $ */
|
||||
/* $NetBSD: aha.c,v 1.9 1996/04/29 20:28:40 christos Exp $ */
|
||||
|
||||
#define AHADIAG
|
||||
#define integrate
|
||||
|
@ -694,11 +694,10 @@ aha_start_ccbs(sc)
|
|||
int iobase = sc->sc_iobase;
|
||||
struct aha_mbx_out *wmbo; /* Mail Box Out pointer */
|
||||
struct aha_ccb *ccb;
|
||||
int i;
|
||||
|
||||
wmbo = wmbx->tmbo;
|
||||
|
||||
while (ccb = sc->sc_waiting_ccb.tqh_first) {
|
||||
while ((ccb = sc->sc_waiting_ccb.tqh_first) != NULL) {
|
||||
if (sc->sc_mbofull >= AHA_MBX_SIZE) {
|
||||
aha_collect_mbo(sc);
|
||||
if (sc->sc_mbofull >= AHA_MBX_SIZE) {
|
||||
|
@ -1116,7 +1115,9 @@ aha_scsi_cmd(xs)
|
|||
int seg; /* scatter gather seg being worked on */
|
||||
u_long thiskv, thisphys, nextphys;
|
||||
int bytes_this_seg, bytes_this_page, datalen, flags;
|
||||
#ifdef TFS
|
||||
struct iovec *iovp;
|
||||
#endif
|
||||
int s;
|
||||
|
||||
SC_DEBUG(sc_link, SDEV_DB2, ("aha_scsi_cmd\n"));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mcd.c,v 1.47 1996/04/11 22:29:43 cgd Exp $ */
|
||||
/* $NetBSD: mcd.c,v 1.48 1996/04/29 20:28:44 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
|
@ -138,10 +138,9 @@ struct mcd_softc {
|
|||
};
|
||||
|
||||
/* prototypes */
|
||||
int mcdopen __P((dev_t, int, int, struct proc *));
|
||||
int mcdclose __P((dev_t, int, int));
|
||||
int mcdioctl __P((dev_t, u_long, caddr_t, int, struct proc *));
|
||||
int mcdsize __P((dev_t));
|
||||
/* XXX does not belong here */
|
||||
cdev_decl(mcd);
|
||||
bdev_decl(mcd);
|
||||
|
||||
static int bcd2bin __P((bcd_t));
|
||||
static bcd_t bin2bcd __P((int));
|
||||
|
@ -185,10 +184,13 @@ struct cfdriver mcd_cd = {
|
|||
NULL, "mcd", DV_DISK
|
||||
};
|
||||
|
||||
void mcdgetdisklabel __P((struct mcd_softc *));
|
||||
int mcd_get_parms __P((struct mcd_softc *));
|
||||
void mcdstrategy __P((struct buf *));
|
||||
void mcdstart __P((struct mcd_softc *));
|
||||
void mcdgetdisklabel __P((struct mcd_softc *));
|
||||
int mcd_get_parms __P((struct mcd_softc *));
|
||||
void mcdstrategy __P((struct buf *));
|
||||
void mcdstart __P((struct mcd_softc *));
|
||||
int mcdlock __P((struct mcd_softc *));
|
||||
void mcdunlock __P((struct mcd_softc *));
|
||||
void mcd_pseudointr __P((void *));
|
||||
|
||||
struct dkdriver mcddkdriver = { mcdstrategy };
|
||||
|
||||
|
@ -288,7 +290,7 @@ mcdopen(dev, flag, fmt, p)
|
|||
if (!sc)
|
||||
return ENXIO;
|
||||
|
||||
if (error = mcdlock(sc))
|
||||
if ((error = mcdlock(sc)) != 0)
|
||||
return error;
|
||||
|
||||
if (sc->sc_dk.dk_openmask != 0) {
|
||||
|
@ -378,9 +380,10 @@ bad3:
|
|||
}
|
||||
|
||||
int
|
||||
mcdclose(dev, flag, fmt)
|
||||
mcdclose(dev, flag, fmt, p)
|
||||
dev_t dev;
|
||||
int flag, fmt;
|
||||
struct proc *p;
|
||||
{
|
||||
struct mcd_softc *sc = mcd_cd.cd_devs[MCDUNIT(dev)];
|
||||
int part = MCDPART(dev);
|
||||
|
@ -388,7 +391,7 @@ mcdclose(dev, flag, fmt)
|
|||
|
||||
MCD_TRACE("close: partition=%d\n", part, 0, 0, 0);
|
||||
|
||||
if (error = mcdlock(sc))
|
||||
if ((error = mcdlock(sc)) != 0)
|
||||
return error;
|
||||
|
||||
switch (fmt) {
|
||||
|
@ -426,7 +429,7 @@ mcdstrategy(bp)
|
|||
bp->b_blkno, bp->b_bcount, 0);
|
||||
if (bp->b_blkno < 0 ||
|
||||
(bp->b_bcount % sc->blksize) != 0) {
|
||||
printf("%s: strategy: blkno = %d bcount = %d\n",
|
||||
printf("%s: strategy: blkno = %d bcount = %ld\n",
|
||||
sc->sc_dev.dv_xname, bp->b_blkno, bp->b_bcount);
|
||||
bp->b_error = EINVAL;
|
||||
goto bad;
|
||||
|
@ -526,18 +529,20 @@ loop:
|
|||
}
|
||||
|
||||
int
|
||||
mcdread(dev, uio)
|
||||
mcdread(dev, uio, flags)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (physio(mcdstrategy, NULL, dev, B_READ, minphys, uio));
|
||||
}
|
||||
|
||||
int
|
||||
mcdwrite(dev, uio)
|
||||
mcdwrite(dev, uio, flags)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
int flags;
|
||||
{
|
||||
|
||||
return (physio(mcdstrategy, NULL, dev, B_WRITE, minphys, uio));
|
||||
|
@ -575,7 +580,7 @@ mcdioctl(dev, cmd, addr, flag, p)
|
|||
if ((flag & FWRITE) == 0)
|
||||
return EBADF;
|
||||
|
||||
if (error = mcdlock(sc))
|
||||
if ((error = mcdlock(sc)) != 0)
|
||||
return error;
|
||||
sc->flags |= MCDF_LABELLING;
|
||||
|
||||
|
@ -1005,9 +1010,10 @@ msf2hsg(msf, relative)
|
|||
}
|
||||
|
||||
void
|
||||
mcd_pseudointr(sc)
|
||||
struct mcd_softc *sc;
|
||||
mcd_pseudointr(v)
|
||||
void *v;
|
||||
{
|
||||
struct mcd_softc *sc = v;
|
||||
int s;
|
||||
|
||||
s = splbio();
|
||||
|
@ -1158,7 +1164,6 @@ readerr:
|
|||
printf("; giving up\n");
|
||||
|
||||
changed:
|
||||
harderr:
|
||||
/* Invalidate the buffer. */
|
||||
bp->b_flags |= B_ERROR;
|
||||
bp->b_resid = bp->b_bcount - mbx->skip;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sbdspvar.h,v 1.12 1996/03/16 04:00:13 jtk Exp $ */
|
||||
/* $NetBSD: sbdspvar.h,v 1.13 1996/04/29 20:28:50 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1993 Regents of the University of California.
|
||||
|
@ -179,8 +179,8 @@ int sbdsp_get_avail_out_ports __P((void *));
|
|||
int sbdsp_speaker_ctl __P((void *, int));
|
||||
int sbdsp_commit_settings __P((void *));
|
||||
|
||||
int sbdsp_dma_output __P((void *, void *, int, void (*)(), void*));
|
||||
int sbdsp_dma_input __P((void *, void *, int, void (*)(), void*));
|
||||
int sbdsp_dma_output __P((void *, void *, int, void (*)(void *), void*));
|
||||
int sbdsp_dma_input __P((void *, void *, int, void (*)(void *), void*));
|
||||
|
||||
int sbdsp_haltdma __P((void *));
|
||||
int sbdsp_contdma __P((void *));
|
||||
|
|
|
@ -260,12 +260,14 @@ static const BiosSignature signatures[] = {
|
|||
|
||||
#define nsignatures (sizeof(signatures) / sizeof(signatures[0]))
|
||||
|
||||
#ifdef notdef
|
||||
static const char *bases[] = {
|
||||
(char *) 0xc8000, (char *) 0xca000, (char *) 0xcc000,
|
||||
(char *) 0xce000, (char *) 0xdc000, (char *) 0xde000
|
||||
};
|
||||
|
||||
#define nbases (sizeof(bases) / sizeof(bases[0]))
|
||||
#endif
|
||||
|
||||
int seaintr __P((void *));
|
||||
int sea_scsi_cmd __P((struct scsi_xfer *));
|
||||
|
@ -383,7 +385,7 @@ seaprobe(parent, match, aux)
|
|||
break;
|
||||
default:
|
||||
#ifdef DIAGNOSTIC
|
||||
printf("%s: board type unknown at address 0x%lx\n",
|
||||
printf("%s: board type unknown at address %p\n",
|
||||
sea->sc_dev.dv_xname, sea->maddr);
|
||||
#endif
|
||||
return 0;
|
||||
|
@ -629,8 +631,9 @@ sea_get_scb(sea, flags)
|
|||
break;
|
||||
}
|
||||
if (sea->numscbs < SEA_SCB_MAX) {
|
||||
if (scb = (struct sea_scb *) malloc(sizeof(struct sea_scb),
|
||||
M_TEMP, M_NOWAIT)) {
|
||||
scb = (struct sea_scb *) malloc(sizeof(struct sea_scb),
|
||||
M_TEMP, M_NOWAIT);
|
||||
if (scb) {
|
||||
bzero(scb, sizeof(struct sea_scb));
|
||||
sea->numscbs++;
|
||||
} else
|
||||
|
@ -884,6 +887,7 @@ sea_reselect(sea)
|
|||
printf("%s: expecting IDENTIFY message, got 0x%x\n",
|
||||
sea->sc_dev.dv_xname, msg[0]);
|
||||
abort = 1;
|
||||
scb = NULL;
|
||||
} else {
|
||||
lun = msg[0] & 0x07;
|
||||
|
||||
|
|
Loading…
Reference in New Issue