mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-28 02:50:41 +03:00
cleanup: drop assign before use
Drop unneeded assigns singe vars are set later in code before their first use (Coverity).
This commit is contained in:
parent
cea441f4d1
commit
9fe4f2337b
@ -1249,8 +1249,8 @@ static int _update_metadata(lvmetad_state *s, const char *arg_name, const char *
|
||||
const char *old_vgid = NULL;
|
||||
const char *new_vgid = NULL;
|
||||
const char *new_metadata_vgid;
|
||||
int new_seq;
|
||||
int old_seq = -1;
|
||||
int new_seq = -1;
|
||||
int needs_repair = 0;
|
||||
int abort_daemon = 0;
|
||||
int retval = 0;
|
||||
|
2
lib/cache/lvmcache.c
vendored
2
lib/cache/lvmcache.c
vendored
@ -858,7 +858,7 @@ static void _choose_preferred_devs(struct cmd_context *cmd,
|
||||
struct dm_list *add_cache_devs)
|
||||
{
|
||||
char uuid[64] __attribute__((aligned(8)));
|
||||
const char *reason = "none";
|
||||
const char *reason;
|
||||
struct dm_list altdevs;
|
||||
struct dm_list new_unused;
|
||||
struct dev_types *dt = cmd->dev_types;
|
||||
|
@ -956,7 +956,7 @@ static int _raid_add_images(struct logical_volume *lv,
|
||||
int commit, int use_existing_area_len)
|
||||
{
|
||||
int rebuild_flag_cleared = 0;
|
||||
struct lv_segment *seg = first_seg(lv);
|
||||
struct lv_segment *seg;
|
||||
uint32_t s;
|
||||
|
||||
if (!_raid_add_images_without_commit(lv, new_count, pvs, use_existing_area_len))
|
||||
|
@ -472,7 +472,7 @@ static int _check_pool_create(const struct logical_volume *lv)
|
||||
|
||||
int update_pool_lv(struct logical_volume *lv, int activate)
|
||||
{
|
||||
int monitored = DMEVENTD_MONITOR_IGNORE;
|
||||
int monitored;
|
||||
int ret = 1;
|
||||
|
||||
if (!lv_is_thin_pool(lv)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user