main - cov: initialize attr
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a8ee13900db58b018e143fbf6a3435c7803e82fe Commit: a8ee13900db58b018e143fbf6a3435c7803e82fe Parent: be1c2a1ae2da445309f04ac4e3ed7470ff29d436 Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Sep 10 22:32:26 2021 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Sep 13 12:34:41 2021 +0200
cov: initialize attr
--- lib/activate/activate.c | 2 +- lib/metadata/cache_manip.c | 2 +- lib/metadata/lv_manip.c | 2 +- lib/metadata/raid_manip.c | 4 ++-- lib/misc/lvm-exec.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)
lib/activate/activate.c +1 -1
@@ -1491,7 +1491,7 @@ int lvs_in_vg_opened(const struct volume_group *vg)*/ int raid4_is_supported (struct cmd_context *cmd,const struct segment_type *segtype) { -unsigned attrs; +unsigned attrs =0 ; if (segtype_is_raid4(segtype) && (!segtype->ops->target_present ||
lib/metadata/cache_manip.c +1 -1
@@ -749,7 +749,7 @@ static const char *_get_default_cache_policy(struct cmd_context *cmd)static cache_metadata_format_t _get_default_cache_metadata_format (struct cmd_context *cmd) {const struct segment_type *segtype =get_segtype_from_string (cmd,SEG_TYPE_NAME_CACHE ); -unsigned attr; +unsigned attr =0 ;cache_metadata_format_t f; if (!segtype ||
lib/metadata/lv_manip.c +1 -1
@@ -5216,7 +5216,7 @@ static int _lvresize_check(struct logical_volume *lv,if (lv_is_raid (lv) && lp->resize ==LV_REDUCE ) { -unsigned attrs; +unsigned attrs =0 ;const struct segment_type *segtype =first_seg (lv)->segtype; if (!segtype->ops->target_present ||
lib/metadata/raid_manip.c +2 -2
@@ -46,7 +46,7 @@ static int _check_restriping(uint32_t new_stripes, struct logical_volume *lv)*/ static int _reshape_is_supported (struct cmd_context *cmd,const struct segment_type *segtype) { -unsigned attrs; +unsigned attrs =0 ; if (!segtype->ops->target_present || !segtype->ops->target_present(cmd, NULL, &attrs) ||
@@ -65,7 +65,7 @@ static int _reshape_is_supported(struct cmd_context *cmd, const struct segment_tstatic int _rebuild_with_emptymeta_is_supported (struct cmd_context *cmd,const struct segment_type *segtype) { -unsigned attrs; +unsigned attrs =0 ; if (!segtype->ops->target_present || !segtype->ops->target_present(cmd, NULL, &attrs) ||
lib/misc/lvm-exec.c +1 -1
@@ -50,7 +50,7 @@ int exec_cmd(struct cmd_context *cmd, const char *const argv[], int *rstatus, int sync_needed) {pid_t pid; -int status; +int status =0 ;char buf[PATH_MAX *2 ];if (rstatus)