]> granicus.if.org Git - zfs/commitdiff
Update gcc-unit
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 14 Jun 2010 22:24:20 +0000 (15:24 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 14 Jun 2010 22:24:20 +0000 (15:24 -0700)
Fix new possibly uninitialized variables according to gcc.

cmd/zpool/zpool_main.c
module/zfs/dmu_objset.c
module/zfs/sa.c
module/zfs/zil.c

index dd0fb0b304a131183d6a106e428804a1ae5f7cf3..35b0bdc4789aa683fab5f86d3c3a40606c8b96f3 100644 (file)
@@ -3243,7 +3243,7 @@ print_scan_status(pool_scan_stat_t *ps)
         */
        if (ps->pss_state == DSS_FINISHED) {
                uint64_t minutes_taken = (end - start) / 60;
-               char *fmt;
+               char *fmt = NULL;
 
                if (ps->pss_func == POOL_SCAN_SCRUB) {
                        fmt = gettext("scrub repaired %s in %lluh%um with "
index 690e6ecdee6ab84e5611ee49ca8ca295fb25c97a..9bd09c9db64932ff657fe1416a43b3739f679577 100644 (file)
@@ -1215,7 +1215,7 @@ dmu_objset_userquota_get_ids(dnode_t *dn, boolean_t before, dmu_tx_t *tx)
        objset_t *os = dn->dn_objset;
        void *data = NULL;
        dmu_buf_impl_t *db = NULL;
-       uint64_t *user, *group;
+       uint64_t *user = NULL, *group = NULL;
        int flags = dn->dn_id_flags;
        int error;
        boolean_t have_spill = B_FALSE;
index a91b379f998455ec4291e8928aa8dcb68933c7d6..cf232c2b6453f9a5186c4fe12d7c73d1f5bbe585 100644 (file)
@@ -637,7 +637,7 @@ sa_build_layouts(sa_handle_t *hdl, sa_bulk_attr_t *attr_desc, int attr_count,
        int buf_space;
        sa_attr_type_t *attrs, *attrs_start;
        int i, lot_count;
-       int hdrsize, spillhdrsize;
+       int hdrsize, spillhdrsize = 0;
        int used;
        dmu_object_type_t bonustype;
        sa_lot_t *lot;
@@ -1541,7 +1541,7 @@ sa_modify_attrs(sa_handle_t *hdl, sa_attr_type_t newattr,
        sa_bulk_attr_t *attr_desc;
        void *old_data[2];
        int bonus_attr_count = 0;
-       int bonus_data_size, spill_data_size;
+       int bonus_data_size = 0, spill_data_size = 0;
        int spill_attr_count = 0;
        int error;
        uint16_t length;
index 4aa4d10b07e80a8ecd61024bb244a3a78b025369..ff25fd2233afe7822aa41bd1fdffbd2957f8fd2d 100644 (file)
@@ -287,6 +287,8 @@ zil_parse(zilog_t *zilog, zil_parse_blk_func_t *parse_blk_func,
        char *lrbuf, *lrp;
        int error = 0;
 
+       bzero(&next_blk, sizeof(blkptr_t));
+
        /*
         * Old logs didn't record the maximum zh_claim_lr_seq.
         */
@@ -308,7 +310,7 @@ zil_parse(zilog_t *zilog, zil_parse_blk_func_t *parse_blk_func,
        for (blk = zh->zh_log; !BP_IS_HOLE(&blk); blk = next_blk) {
                uint64_t blk_seq = blk.blk_cksum.zc_word[ZIL_ZC_SEQ];
                int reclen;
-               char *end;
+               char *end = NULL;
 
                if (blk_seq > claim_blk_seq)
                        break;