Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi shut up GCC about possibly-uninit; some KNF
details: https://anonhg.NetBSD.org/src/rev/1128ad4ef129
branches: trunk
changeset: 359858:1128ad4ef129
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Fri Jan 28 14:02:45 2022 +0000
description:
shut up GCC about possibly-uninit; some KNF
diffstat:
sys/dev/scsipi/scsiconf.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (37 lines):
diff -r 488987876ca8 -r 1128ad4ef129 sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Thu Jan 27 21:50:50 2022 +0000
+++ b/sys/dev/scsipi/scsiconf.c Fri Jan 28 14:02:45 2022 +0000
@@ -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 @@
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 @@
*/
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++) {
Home |
Main Index |
Thread Index |
Old Index