Fix gcc unused variable warnings
[zfs.git] / module / zfs / dnode_sync.c
index 0b5535d..7d304b2 100644 (file)
@@ -328,8 +328,8 @@ dnode_sync_free_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx)
                ASSERT3U(blkid + nblks, <=, dn->dn_phys->dn_nblkptr);
                (void) free_blocks(dn, bp + blkid, nblks, tx);
                if (trunc) {
-                       uint64_t off = (dn->dn_phys->dn_maxblkid + 1) *
-                           (dn->dn_phys->dn_datablkszsec << SPA_MINBLOCKSHIFT);
+                       ASSERTV(uint64_t off = (dn->dn_phys->dn_maxblkid + 1) *
+                           (dn->dn_phys->dn_datablkszsec<<SPA_MINBLOCKSHIFT));
                        dn->dn_phys->dn_maxblkid = (blkid ? blkid - 1 : 0);
                        ASSERT(off < dn->dn_phys->dn_maxblkid ||
                            dn->dn_phys->dn_maxblkid == 0 ||
@@ -358,8 +358,8 @@ dnode_sync_free_range(dnode_t *dn, uint64_t blkid, uint64_t nblks, dmu_tx_t *tx)
                dbuf_rele(db, FTAG);
        }
        if (trunc) {
-               uint64_t off = (dn->dn_phys->dn_maxblkid + 1) *
-                   (dn->dn_phys->dn_datablkszsec << SPA_MINBLOCKSHIFT);
+               ASSERTV(uint64_t off = (dn->dn_phys->dn_maxblkid + 1) *
+                   (dn->dn_phys->dn_datablkszsec << SPA_MINBLOCKSHIFT));
                dn->dn_phys->dn_maxblkid = (blkid ? blkid - 1 : 0);
                ASSERT(off < dn->dn_phys->dn_maxblkid ||
                    dn->dn_phys->dn_maxblkid == 0 ||
@@ -527,8 +527,8 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx)
        dnode_phys_t *dnp = dn->dn_phys;
        int txgoff = tx->tx_txg & TXG_MASK;
        list_t *list = &dn->dn_dirty_records[txgoff];
-       static const dnode_phys_t zerodn = { 0 };
        boolean_t kill_spill = B_FALSE;
+       ASSERTV(static const dnode_phys_t zerodn = { 0 });
 
        ASSERT(dmu_tx_is_syncing(tx));
        ASSERT(dnp->dn_type != DMU_OT_NONE || dn->dn_allocated_txg);