diff options
author | Rich Ercolani <[email protected]> | 2022-02-14 13:04:50 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-02-14 10:04:50 -0800 |
commit | dec1eef4c576d696bdce20b999d851370faae12a (patch) | |
tree | bfb2c4b675e77fbbda60e432bb944aaff1803b02 /module/zfs/dsl_dataset.c | |
parent | 9f734e81f42b929920428b824659405e8710819f (diff) |
Silence uninitialized warnings in dsl_dataset.c
On newer compilers, dsl_dataset.c now warns (or, on DEBUG, errors)
on uninitialized variable usage.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rich Ercolani <[email protected]>
Closes #13083
Diffstat (limited to 'module/zfs/dsl_dataset.c')
-rw-r--r-- | module/zfs/dsl_dataset.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c index 459faafee..85b48fd12 100644 --- a/module/zfs/dsl_dataset.c +++ b/module/zfs/dsl_dataset.c @@ -2386,18 +2386,18 @@ get_receive_resume_token_impl(dsl_dataset_t *ds) } if (dsl_dataset_feature_is_active(ds, SPA_FEATURE_REDACTED_DATASETS)) { - uint64_t num_redact_snaps; - uint64_t *redact_snaps; - VERIFY(dsl_dataset_get_uint64_array_feature(ds, + uint64_t num_redact_snaps = 0; + uint64_t *redact_snaps = NULL; + VERIFY3B(dsl_dataset_get_uint64_array_feature(ds, SPA_FEATURE_REDACTED_DATASETS, &num_redact_snaps, - &redact_snaps)); + &redact_snaps), ==, B_TRUE); fnvlist_add_uint64_array(token_nv, "redact_snaps", redact_snaps, num_redact_snaps); } if (zap_contains(dp->dp_meta_objset, ds->ds_object, DS_FIELD_RESUME_REDACT_BOOKMARK_SNAPS) == 0) { - uint64_t num_redact_snaps, int_size; - uint64_t *redact_snaps; + uint64_t num_redact_snaps = 0, int_size = 0; + uint64_t *redact_snaps = NULL; VERIFY0(zap_length(dp->dp_meta_objset, ds->ds_object, DS_FIELD_RESUME_REDACT_BOOKMARK_SNAPS, &int_size, &num_redact_snaps)); |