Module Name:    src
Committed By:   skrll
Date:           Sat Apr 30 15:09:25 UTC 2016

Modified Files:
        src/sys/arch/prep/stand/boot: siop.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/prep/stand/boot/siop.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/arch/prep/stand/boot/siop.c
diff -u src/sys/arch/prep/stand/boot/siop.c:1.2 src/sys/arch/prep/stand/boot/siop.c:1.3
--- src/sys/arch/prep/stand/boot/siop.c:1.2	Thu Apr  3 23:49:47 2014
+++ src/sys/arch/prep/stand/boot/siop.c	Sat Apr 30 15:09:25 2016
@@ -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
  * All rights reserved.
@@ -864,7 +864,7 @@ scsi_interpret_sense(struct siop_adapter
 {
 	struct scsi_sense_data *sense;
 	u_int8_t key;
-	int error;
+	int error = 0;
 	uint32_t info;
 	static const char *error_mes[] = {
 		"soft error (corrected)",
@@ -923,7 +923,6 @@ scsi_interpret_sense(struct siop_adapter
 				xs->resid = 0;	/* not short read */
 			}
 		case SKEY_EQUAL:
-			error = 0;
 			break;
 		case SKEY_NOT_READY:
 			if (adp->sd->sc_flags & FLAGS_REMOVABLE)
@@ -952,7 +951,6 @@ scsi_interpret_sense(struct siop_adapter
 			error = EROFS;
 			break;
 		case SKEY_BLANK_CHECK:
-			error = 0;
 			break;
 		case SKEY_ABORTED_COMMAND:
 			break;

Reply via email to