diff options
author | mav <mav@FreeBSD.org> | 2016-10-12 05:14:04 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-10-12 05:14:04 +0000 |
commit | 6cff35eca653c8c09f9cb679e7810dfbe6020574 (patch) | |
tree | ee62571f227badfed42e0dd330c7072ad5922da8 /cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c | |
parent | cb274e73515a0ec312d18ab8f4b522a0b8fc906b (diff) | |
download | FreeBSD-src-6cff35eca653c8c09f9cb679e7810dfbe6020574.zip FreeBSD-src-6cff35eca653c8c09f9cb679e7810dfbe6020574.tar.gz |
MFC r305206: MFV r302658:
6872 zfs libraries should not allow uninitialized variables
illumos/illumos-gate@f83b46baf98d276f5f84fa84c8b461f412ac1f5e
https://github.com/illumos/illumos-gate/commit/f83b46baf98d276f5f84fa84c8b461f41
2ac1f5e
https://www.illumos.org/issues/6872
We compile the zfs libraries with -Wno-uninitialized. We should remove
this. Change makefiles, fix new warnings, fix pbchk errors.
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Paul Dagnelie <pcd@delphix.com>
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c index aee32b7..a31bc5e 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c @@ -1570,7 +1570,7 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props) libzfs_handle_t *hdl = zhp->zfs_hdl; nvlist_t *nvl; int nvl_len; - int added_resv; + int added_resv = 0; (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot set property for '%s'"), @@ -3201,7 +3201,7 @@ zfs_create_ancestors(libzfs_handle_t *hdl, const char *path) { int prefix; char *path_copy; - int rc; + int rc = 0; if (check_parents(hdl, path, NULL, B_TRUE, &prefix) != 0) return (-1); @@ -3843,7 +3843,7 @@ zfs_rollback(zfs_handle_t *zhp, zfs_handle_t *snap, boolean_t force) rollback_data_t cb = { 0 }; int err; boolean_t restore_resv = 0; - uint64_t old_volsize, new_volsize; + uint64_t old_volsize = 0, new_volsize; zfs_prop_t resv_prop; assert(zhp->zfs_type == ZFS_TYPE_FILESYSTEM || @@ -4060,6 +4060,7 @@ zfs_rename(zfs_handle_t *zhp, const char *source, const char *target, "child dataset with inherited mountpoint is used " "in a non-global zone")); (void) zfs_error(hdl, EZFS_ZONED, errbuf); + ret = -1; goto error; } |