]> granicus.if.org Git - zfs/commitdiff
Extra uninit vars flagged by gcc 4.1.2
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 16 Jun 2010 18:45:07 +0000 (11:45 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 16 Jun 2010 18:45:07 +0000 (11:45 -0700)
Newer versions of the compiler are OK with this but for the sake of
older compilers explicitly initialize them.

cmd/zdb/zdb.c
module/zfs/vdev_label.c

index ff73072f8a64f5622c23cb5b2b3c625af3b9e9b4..a83a290ce45dc1f6c8c3e0d4fba6a21c86ae1ba5 100644 (file)
@@ -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 };
 
index 38acbd20caf8224ca889ff0e26942a0d16435da2..f7956799e99424cb10bc6e2ff2ce18def1011cd5 100644 (file)
@@ -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);