From 8a001d8f59f6a21ef3fcd9ef04e5fe9a4dd80bb5 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 16 Jun 2010 11:45:07 -0700 Subject: [PATCH] Extra uninit vars flagged by gcc 4.1.2 Newer versions of the compiler are OK with this but for the sake of older compilers explicitly initialize them. --- cmd/zdb/zdb.c | 2 +- module/zfs/vdev_label.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index ff73072f8a..a83a290ce4 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -2862,7 +2862,7 @@ find_zpool(char **target, nvlist_t **configp, int dirc, char **dirv) nvlist_t *match = NULL; char *name = NULL; char *sepp = NULL; - char sep; + char sep = 0; int count = 0; importargs_t args = { 0 }; diff --git a/module/zfs/vdev_label.c b/module/zfs/vdev_label.c index 38acbd20ca..f7956799e9 100644 --- a/module/zfs/vdev_label.c +++ b/module/zfs/vdev_label.c @@ -597,7 +597,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 = 0, l2cache_guid; + uint64_t spare_guid = 0, l2cache_guid = 0; int flags = ZIO_FLAG_CONFIG_WRITER | ZIO_FLAG_CANFAIL; ASSERT(spa_config_held(spa, SCL_ALL, RW_WRITER) == SCL_ALL);