1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: initialize attr

This commit is contained in:
Zdenek Kabelac 2021-09-10 22:32:26 +02:00
parent be1c2a1ae2
commit a8ee13900d
5 changed files with 6 additions and 6 deletions

View File

@ -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 ||

View File

@ -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 ||

View File

@ -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 ||

View File

@ -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_t
static 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) ||

View File

@ -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)