Skip to content

Commit eab5877

Browse files
committed
plugins: fix missing braces around initializer warnings
The fix required for the muon build on CentOS. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent a189765 commit eab5877

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

plugins/memblaze/memblaze-nvme.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ static int mb_get_smart_log_add(int argc, char **argv, struct command *cmd, stru
16161616

16171617
// Get log
16181618

1619-
struct smart_log_add log = {0};
1619+
struct smart_log_add log = {{{{{0}}}}};
16201620

16211621
err = nvme_get_log_simple(dev_fd(dev), LID_SMART_LOG_ADD, sizeof(struct smart_log_add),
16221622
&log);
@@ -1980,7 +1980,7 @@ static int mb_get_latency_stats(int argc, char **argv, struct command *cmd, stru
19801980

19811981
// Get log
19821982

1983-
struct latency_stats log = {0};
1983+
struct latency_stats log = {{{0}}};
19841984

19851985
err = nvme_get_log_simple(dev_fd(dev), LID_LATENCY_STATISTICS, sizeof(struct latency_stats),
19861986
&log);
@@ -2086,7 +2086,7 @@ static int mb_get_high_latency_log(int argc, char **argv, struct command *cmd,
20862086

20872087
// Get log
20882088

2089-
struct high_latency_log log = {0};
2089+
struct high_latency_log log = {{{0}}};
20902090

20912091
err = nvme_get_log_simple(dev_fd(dev), LID_HIGH_LATENCY_LOG,
20922092
sizeof(struct high_latency_log), &log);
@@ -2339,7 +2339,7 @@ static int mb_get_performance_stats(int argc, char **argv, struct command *cmd,
23392339

23402340
// Get log
23412341

2342-
struct performance_stats log = {0};
2342+
struct performance_stats log = {{{0}}};
23432343

23442344
int log_size = 4 + cfg.duration * sizeof(struct performance_stats_timestamp);
23452345
// Get one more timestamp if duration is odd number to avoid non-dw alignment issues

plugins/scaleflux/sfx-nvme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1567,7 +1567,7 @@ static int sfx_status(int argc, char **argv, struct command *cmd, struct plugin
15671567
struct nvme_id_ctrl id_ctrl = { 0 };
15681568
struct extended_health_info_myrtle sfx_smart = { 0 };
15691569
struct nvme_smart_log smart_log = { 0 };
1570-
struct nvme_additional_smart_log additional_smart_log = { 0 };
1570+
struct nvme_additional_smart_log additional_smart_log = {{ 0 }};
15711571
struct sfx_freespace_ctx sfx_freespace = { 0 };
15721572
struct nvme_get_features_args get_feat_args = { 0 };
15731573
unsigned int get_feat_result, pcie_correctable, pcie_fatal, pcie_nonfatal;

0 commit comments

Comments
 (0)