Ensure variables are initialized. Fixes error due to -Wmaybe-unitialized.
This commit is contained in:
parent
9aed0f5ab2
commit
daf039cf2e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rf_dagffrd.c,v 1.19 2013/09/15 12:23:06 martin Exp $ */
|
||||
/* $NetBSD: rf_dagffrd.c,v 1.20 2016/12/11 05:27:00 nat Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1995 Carnegie-Mellon University.
|
||||
* All rights reserved.
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf_dagffrd.c,v 1.19 2013/09/15 12:23:06 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf_dagffrd.c,v 1.20 2016/12/11 05:27:00 nat Exp $");
|
||||
|
||||
#include <dev/raidframe/raidframevar.h>
|
||||
|
||||
|
@ -139,6 +139,10 @@ rf_CreateNonredundantDAG(RF_Raid_t *raidPtr,
|
|||
n = asmap->numStripeUnitsAccessed;
|
||||
dag_h->creator = "NonredundantDAG";
|
||||
|
||||
doFunc = rf_NullNodeFunc;
|
||||
undoFunc = rf_NullNodeUndoFunc;
|
||||
name = NULL;
|
||||
|
||||
RF_ASSERT(RF_IO_IS_R_OR_W(type));
|
||||
switch (type) {
|
||||
case RF_IO_TYPE_READ:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rf_engine.c,v 1.51 2016/01/03 08:17:24 mlelstv Exp $ */
|
||||
/* $NetBSD: rf_engine.c,v 1.52 2016/12/11 05:27:00 nat Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1995 Carnegie-Mellon University.
|
||||
* All rights reserved.
|
||||
|
@ -55,7 +55,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.51 2016/01/03 08:17:24 mlelstv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rf_engine.c,v 1.52 2016/12/11 05:27:00 nat Exp $");
|
||||
|
||||
#include <sys/errno.h>
|
||||
|
||||
|
@ -229,14 +229,14 @@ NodeReady(RF_DagNode_t *node)
|
|||
{
|
||||
int ready;
|
||||
|
||||
ready = RF_FALSE;
|
||||
|
||||
switch (node->dagHdr->status) {
|
||||
case rf_enable:
|
||||
case rf_rollForward:
|
||||
if ((node->status == rf_wait) &&
|
||||
(node->numAntecedents == node->numAntDone))
|
||||
ready = RF_TRUE;
|
||||
else
|
||||
ready = RF_FALSE;
|
||||
break;
|
||||
case rf_rollBackward:
|
||||
RF_ASSERT(node->numSuccDone <= node->numSuccedents);
|
||||
|
@ -245,8 +245,6 @@ NodeReady(RF_DagNode_t *node)
|
|||
if ((node->status == rf_good) &&
|
||||
(node->numSuccDone == node->numSuccedents))
|
||||
ready = RF_TRUE;
|
||||
else
|
||||
ready = RF_FALSE;
|
||||
break;
|
||||
default:
|
||||
printf("Execution engine found illegal DAG status in NodeReady\n");
|
||||
|
|
Loading…
Reference in New Issue