summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-03-12 10:37:12 -0700
committerBrian Behlendorf <[email protected]>2009-03-12 10:37:12 -0700
commita03187bb3bc611a9b547361d06339db88b254eaf (patch)
tree0fb47da001e1259ebf53848d69fbf9b7539da26b
parent193ea156e9b90a57590751a76ab1bf03b8e24718 (diff)
parent387b58d93e6f85ba8d9b110eeeb278a04eb21bf6 (diff)
Merge branch 'gcc-branch' into refs/top-bases/zfs-branch
-rw-r--r--cmd/zdb/zdb.c2
-rw-r--r--cmd/zfs/zfs_main.c3
-rw-r--r--cmd/zpool/zpool_main.c3
-rw-r--r--cmd/zpool/zpool_vdev.c2
-rw-r--r--cmd/ztest/ztest.c2
-rw-r--r--lib/libzfs/libzfs_dataset.c2
-rw-r--r--lib/libzfs/libzfs_import.c2
-rw-r--r--lib/libzfs/libzfs_util.c2
-rw-r--r--module/zfs/arc.c2
-rw-r--r--module/zfs/dmu.c2
10 files changed, 12 insertions, 10 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index 037ecfde3..c8076b178 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -647,7 +647,7 @@ static int
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);
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
index ea78254f2..7fb6aa6db 100644
--- a/cmd/zfs/zfs_main.c
+++ b/cmd/zfs/zfs_main.c
@@ -542,7 +542,7 @@ zfs_do_create(int argc, char **argv)
{
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;
@@ -4208,6 +4208,7 @@ main(int argc, char **argv)
(void) fprintf(stderr, gettext("unrecognized "
"command '%s'\n"), cmdname);
usage(B_FALSE);
+ ret = 1;
}
}
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index 460c27bc5..18a402aa6 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -1373,7 +1373,7 @@ zpool_do_import(int argc, char **argv)
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;
@@ -3942,6 +3942,7 @@ main(int argc, char **argv)
(void) fprintf(stderr, gettext("unrecognized "
"command '%s'\n"), cmdname);
usage(B_FALSE);
+ ret = 1;
}
libzfs_fini(g_zfs);
diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c
index 10007c149..9fa227c10 100644
--- a/cmd/zpool/zpool_vdev.c
+++ b/cmd/zpool/zpool_vdev.c
@@ -548,7 +548,7 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
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));
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index 3bc201408..fcfeef4da 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -1344,7 +1344,7 @@ ztest_dmu_objset_create_destroy(ztest_args_t *za)
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);
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index c02123b98..f2adf36ea 100644
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -1617,7 +1617,7 @@ zfs_perm_get(zfs_handle_t *zhp, zfs_allow_t **zfs_perms)
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));
diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c
index 4f58ae843..4a7634a63 100644
--- a/lib/libzfs/libzfs_import.c
+++ b/lib/libzfs/libzfs_import.c
@@ -416,7 +416,7 @@ get_configs(libzfs_handle_t *hdl, pool_list_t *pl, boolean_t active_ok)
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;
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c
index b3f09b5fd..b0662d47d 100644
--- a/lib/libzfs/libzfs_util.c
+++ b/lib/libzfs/libzfs_util.c
@@ -889,7 +889,7 @@ zprop_print_one_property(const char *name, zprop_get_cbdata_t *cbp,
const char *source)
{
int i;
- const char *str;
+ const char *str = NULL;
char buf[128];
/*
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 9589006d9..ace79ad0a 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -2609,7 +2609,7 @@ top:
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) {
diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c
index 52373e8b6..b1f3bea77 100644
--- a/module/zfs/dmu.c
+++ b/module/zfs/dmu.c
@@ -189,7 +189,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset,
uint32_t flags;
int err;
zio_t *zio;
- hrtime_t start;
+ hrtime_t start = 0;
ASSERT(length <= DMU_MAX_ACCESS);