mirror of
git://sourceware.org/git/lvm2.git
synced 2024-10-03 17:50:03 +03:00
gcc: single type initializers
Older gcc doesn't really like complex types (buffer, struct) to be initialized without extra {} around such type. So pick any other 'single type' var from a struct and set it to 0, rest will do the compiler without emitting a warning.
This commit is contained in:
parent
ff2cadbf18
commit
038760da4f
@ -449,7 +449,7 @@ static int _ignore_blocked_mirror_devices(struct cmd_context *cmd,
|
||||
struct dm_task *dmt = NULL;
|
||||
int r = 0;
|
||||
char fake_dev_name[16];
|
||||
struct device fake_dev = { 0 };
|
||||
struct device fake_dev = { .fd = 0 };
|
||||
struct dm_str_list *alias;
|
||||
|
||||
if (!(mem = dm_pool_create("blocked_mirrors", 128)))
|
||||
|
@ -595,7 +595,7 @@ int config_file_read_from_file(struct dm_config_tree *cft)
|
||||
struct config_source *cs = dm_config_get_custom(cft);
|
||||
struct config_file *cf;
|
||||
struct stat info;
|
||||
struct device fake_dev = { 0 };
|
||||
struct device fake_dev = { .fd = 0 };
|
||||
struct dm_str_list *alias;
|
||||
int fd;
|
||||
int r;
|
||||
|
@ -814,7 +814,7 @@ static int _lvchange_integrity(struct cmd_context *cmd,
|
||||
struct logical_volume *lv,
|
||||
uint32_t *mr)
|
||||
{
|
||||
struct integrity_settings settings = { 0 };
|
||||
struct integrity_settings settings = { .block_size = 0 };
|
||||
struct logical_volume *lv_image;
|
||||
struct lv_segment *seg, *seg_image;
|
||||
uint32_t s;
|
||||
|
Loading…
Reference in New Issue
Block a user