Module Name: src Committed By: jakllsch Date: Fri Jan 28 14:02:45 UTC 2022
Modified Files: src/sys/dev/scsipi: scsiconf.c Log Message: shut up GCC about possibly-uninit; some KNF To generate a diff of this commit: cvs rdiff -u -r1.294 -r1.295 src/sys/dev/scsipi/scsiconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/scsipi/scsiconf.c diff -u src/sys/dev/scsipi/scsiconf.c:1.294 src/sys/dev/scsipi/scsiconf.c:1.295 --- src/sys/dev/scsipi/scsiconf.c:1.294 Thu Jan 27 18:37:02 2022 +++ src/sys/dev/scsipi/scsiconf.c Fri Jan 28 14:02:45 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.294 2022/01/27 18:37:02 jakllsch Exp $ */ +/* $NetBSD: scsiconf.c,v 1.295 2022/01/28 14:02:45 jakllsch Exp $ */ /*- * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.294 2022/01/27 18:37:02 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.295 2022/01/28 14:02:45 jakllsch Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -482,6 +482,8 @@ int scsi_probe_bus(struct scsibus_softc *sc, int target, int lun) { struct scsipi_channel *chan = sc->sc_channel; + uint16_t *luns; + size_t nluns = 0; /* XXXGCC */ int maxtarget, mintarget, maxlun, minlun; int error; @@ -509,9 +511,6 @@ scsi_probe_bus(struct scsibus_softc *sc, */ scsipi_adapter_ioctl(chan, SCBUSIOLLSCAN, NULL, 0, curproc); - uint16_t *luns; - size_t nluns; - if ((error = scsipi_adapter_addref(chan->chan_adapter)) != 0) goto ret; for (target = mintarget; target <= maxtarget; target++) {