From 3eb4ba3ebd43c7d06ddcf2846b8d3ce22fe7dfc5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Mon, 16 Mar 2009 16:06:50 -0700 Subject: [PATCH] Add 3 more uninit errors detected by gcc 3.4.0 compiler. --- lib/libzfs/libzfs_dataset.c | 2 +- module/zfs/spa_misc.c | 2 +- module/zfs/vdev_label.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index c28460b0a1..7b7c5d2a40 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -3815,7 +3815,7 @@ zfs_rollback(zfs_handle_t *zhp, zfs_handle_t *snap, boolean_t force) zfs_cmd_t zc = { 0 }; boolean_t restore_resv = 0; uint64_t old_volsize = 0, new_volsize; - zfs_prop_t resv_prop; + zfs_prop_t resv_prop = { 0 }; assert(zhp->zfs_type == ZFS_TYPE_FILESYSTEM || zhp->zfs_type == ZFS_TYPE_VOLUME); diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c index 485e83fcea..88775ab23f 100644 --- a/module/zfs/spa_misc.c +++ b/module/zfs/spa_misc.c @@ -385,7 +385,7 @@ spa_lookup(const char *name) static spa_t search; /* spa_t is large; don't allocate on stack */ spa_t *spa; avl_index_t where; - char c; + char c = 0; char *cp; ASSERT(MUTEX_HELD(&spa_namespace_lock)); diff --git a/module/zfs/vdev_label.c b/module/zfs/vdev_label.c index f61de3c4ef..46d0c6dd53 100644 --- a/module/zfs/vdev_label.c +++ b/module/zfs/vdev_label.c @@ -494,7 +494,7 @@ vdev_label_init(vdev_t *vd, uint64_t crtxg, vdev_labeltype_t reason) char *buf; size_t buflen; int error; - uint64_t spare_guid, l2cache_guid; + uint64_t spare_guid = 0, l2cache_guid; int flags = ZIO_FLAG_CONFIG_WRITER | ZIO_FLAG_CANFAIL; ASSERT(spa_config_held(spa, SCL_ALL, RW_WRITER) == SCL_ALL);