Appease gcc - error: 'error' may be used uninitialized in this function

This commit is contained in:
skrll 2016-04-30 15:09:25 +00:00
parent 07f69fc57a
commit c4de8a7181

View File

@ -1,4 +1,4 @@
/* $NetBSD: siop.c,v 1.2 2014/04/03 23:49:47 mrg Exp $ */ /* $NetBSD: siop.c,v 1.3 2016/04/30 15:09:25 skrll Exp $ */
/* /*
* Copyright (c) 2010 KIYOHARA Takashi * Copyright (c) 2010 KIYOHARA Takashi
* All rights reserved. * All rights reserved.
@ -864,7 +864,7 @@ scsi_interpret_sense(struct siop_adapter *adp, struct scsi_xfer *xs)
{ {
struct scsi_sense_data *sense; struct scsi_sense_data *sense;
u_int8_t key; u_int8_t key;
int error; int error = 0;
uint32_t info; uint32_t info;
static const char *error_mes[] = { static const char *error_mes[] = {
"soft error (corrected)", "soft error (corrected)",
@ -923,7 +923,6 @@ scsi_interpret_sense(struct siop_adapter *adp, struct scsi_xfer *xs)
xs->resid = 0; /* not short read */ xs->resid = 0; /* not short read */
} }
case SKEY_EQUAL: case SKEY_EQUAL:
error = 0;
break; break;
case SKEY_NOT_READY: case SKEY_NOT_READY:
if (adp->sd->sc_flags & FLAGS_REMOVABLE) if (adp->sd->sc_flags & FLAGS_REMOVABLE)
@ -952,7 +951,6 @@ scsi_interpret_sense(struct siop_adapter *adp, struct scsi_xfer *xs)
error = EROFS; error = EROFS;
break; break;
case SKEY_BLANK_CHECK: case SKEY_BLANK_CHECK:
error = 0;
break; break;
case SKEY_ABORTED_COMMAND: case SKEY_ABORTED_COMMAND:
break; break;