Fix gcc uninitialized variable warnings

Gcc -Wall warn: 'uninitialized variable'

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2010-08-26 09:58:04 -07:00
parent 1fde1e3720
commit d4ed667343
24 changed files with 49 additions and 41 deletions
+3 -3
View File
@@ -334,7 +334,7 @@ spa_prop_validate(spa_t *spa, nvlist_t *props)
{
nvpair_t *elem;
int error = 0, reset_bootfs = 0;
uint64_t objnum;
uint64_t objnum = 0;
elem = NULL;
while ((elem = nvlist_next_nvpair(props, elem)) != NULL) {
@@ -1144,7 +1144,7 @@ spa_load_l2cache(spa_t *spa)
uint_t nl2cache;
int i, j, oldnvdevs;
uint64_t guid;
vdev_t *vd, **oldvdevs, **newvdevs;
vdev_t *vd, **oldvdevs, **newvdevs = NULL;
spa_aux_vdev_t *sav = &spa->spa_l2cache;
ASSERT(spa_config_held(spa, SCL_ALL, RW_WRITER) == SCL_ALL);
@@ -4019,7 +4019,7 @@ spa_vdev_detach(spa_t *spa, uint64_t guid, uint64_t pguid, int replace_done)
ASSERTV(vdev_t *rvd = spa->spa_root_vdev;)
vdev_t *vd, *pvd, *cvd, *tvd;
boolean_t unspare = B_FALSE;
uint64_t unspare_guid;
uint64_t unspare_guid = 0;
char *vdpath;
int c, t;