From 2420c1b4514ab4e2e22b9c88fb79bcabe10f6664 Mon Sep 17 00:00:00 2001 From: sos Date: Sun, 10 Mar 2002 21:03:04 +0000 Subject: Silence a warning when compile without atapi devices. --- sys/dev/ata/ata-all.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/dev/ata/ata-all.c') diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index de10f7a..2c63f77 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -274,10 +274,8 @@ static int ataioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td) { struct ata_cmd *iocmd = (struct ata_cmd *)addr; - struct ata_device *atadev; struct ata_channel *ch; device_t device = devclass_get_device(ata_devclass, iocmd->channel); - caddr_t buf; int error, s; if (cmd != IOCATA) @@ -375,7 +373,9 @@ ataioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td) return 0; #if defined(DEV_ATAPICD) || defined(DEV_ATAPIFD) || defined(DEV_ATAPIST) - case ATAPICMD: + case ATAPICMD: { + struct ata_device *atadev; + caddr_t buf; if (!device || !(ch = device_get_softc(device))) return ENXIO; @@ -409,6 +409,7 @@ ataioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td) free(buf, M_ATA); return error; + } #endif default: } -- cgit v1.1