Most of these fixes appear to be harmless and should never occur.
However, there were a few cases in this patch which do concern me,
I doubt we're seeing them but they look possible... mainly in the
user tools.
visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
blkptr_t *bp, const zbookmark_t *zb)
{
- int err;
+ int err = 0;
if (bp->blk_birth == 0)
return (0);
{
zfs_type_t type = ZFS_TYPE_FILESYSTEM;
zfs_handle_t *zhp = NULL;
- uint64_t volsize;
+ uint64_t volsize = 0;
int c;
boolean_t noreserve = B_FALSE;
boolean_t bflag = B_FALSE;
(void) fprintf(stderr, gettext("unrecognized "
"command '%s'\n"), cmdname);
usage(B_FALSE);
+ ret = 1;
}
}
char **searchdirs = NULL;
int nsearch = 0;
int c;
- int err;
+ int err = 1;
nvlist_t *pools = NULL;
boolean_t do_all = B_FALSE;
boolean_t do_destroyed = B_FALSE;
(void) fprintf(stderr, gettext("unrecognized "
"command '%s'\n"), cmdname);
usage(B_FALSE);
+ ret = 1;
}
libzfs_fini(g_zfs);
uint_t c, children;
nvlist_t *nv;
char *type;
- replication_level_t lastrep, rep, *ret;
+ replication_level_t lastrep = { 0 }, rep, *ret;
boolean_t dontreport;
ret = safe_malloc(sizeof (replication_level_t));
objects = ztest_random(20);
seq = 0;
while (objects-- != 0) {
- uint64_t object;
+ uint64_t object = 0;
dmu_tx_t *tx = dmu_tx_create(os);
dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0, sizeof (name));
error = dmu_tx_assign(tx, TXG_WAIT);
char *nvpname;
uid_t uid;
gid_t gid;
- avl_tree_t *tree;
+ avl_tree_t *tree = NULL;
avl_index_t where;
(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
pool_entry_t *pe;
vdev_entry_t *ve;
config_entry_t *ce;
- nvlist_t *ret = NULL, *config = NULL, *tmp, *nvtop, *nvroot;
+ nvlist_t *ret = NULL, *config = NULL, *tmp = NULL, *nvtop, *nvroot;
nvlist_t **spares, **l2cache;
uint_t i, nspares, nl2cache;
boolean_t config_seen;
const char *source)
{
int i;
- const char *str;
+ const char *str = NULL;
char buf[128];
/*
uint64_t size = BP_GET_LSIZE(bp);
arc_callback_t *acb;
vdev_t *vd = NULL;
- daddr_t addr;
+ daddr_t addr = -1;
boolean_t devw = B_FALSE;
if (hdr == NULL) {
uint32_t flags;
int err;
zio_t *zio;
- hrtime_t start;
+ hrtime_t start = 0;
ASSERT(length <= DMU_MAX_ACCESS);