diff options
author | Alexander Amelkin <alexander@amelkin.msk.ru> | 2021-04-07 00:50:44 +0300 |
---|---|---|
committer | Alexander Amelkin <alexander@amelkin.msk.ru> | 2021-04-17 01:59:03 +0300 |
commit | 87fc969e45a5b089b8fe4d402393427ab6f7af45 (patch) | |
tree | 6f6b092cd034b38c85fa7975f2cf277a3cbc6d48 | |
parent | 69cdef116aaeb79c977b0d18cfc38012f8233496 (diff) | |
download | ipmitool-87fc969e45a5b089b8fe4d402393427ab6f7af45.tar.gz |
Fix compiler warning
Refactor plugin ipmi_intf structure initialization for some
plugins to stop the compiler complaining like this:
warning: use of GNU old-style field designator
extension [-Wgnu-designator]
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
-rw-r--r-- | src/plugins/bmc/bmc.c | 11 | ||||
-rw-r--r-- | src/plugins/free/free.c | 12 | ||||
-rw-r--r-- | src/plugins/lipmi/lipmi.c | 12 |
3 files changed, 18 insertions, 17 deletions
diff --git a/src/plugins/bmc/bmc.c b/src/plugins/bmc/bmc.c index b88b077..eee6936 100644 --- a/src/plugins/bmc/bmc.c +++ b/src/plugins/bmc/bmc.c @@ -68,11 +68,12 @@ static struct ipmi_rs *ipmi_bmc_send_cmd_putmsg(struct ipmi_intf *intf, #define MESSAGE_BUFSIZE 1024 struct ipmi_intf ipmi_bmc_intf = { - name: "bmc", - desc: "IPMI v2.0 BMC interface", - open: ipmi_bmc_open, - close: ipmi_bmc_close, - sendrecv: ipmi_bmc_send_cmd}; + .name = "bmc", + .desc = "IPMI v2.0 BMC interface", + .open = ipmi_bmc_open, + .close = ipmi_bmc_close, + .sendrecv = ipmi_bmc_send_cmd +}; void ipmi_bmc_close(struct ipmi_intf *intf) diff --git a/src/plugins/free/free.c b/src/plugins/free/free.c index 96fc9ad..805a901 100644 --- a/src/plugins/free/free.c +++ b/src/plugins/free/free.c @@ -310,11 +310,11 @@ static struct ipmi_rs * ipmi_free_send_cmd(struct ipmi_intf * intf, struct ipmi_ } struct ipmi_intf ipmi_free_intf = { - name: "free", - desc: "FreeIPMI IPMI Interface", - open: ipmi_free_open, - close: ipmi_free_close, - sendrecv: ipmi_free_send_cmd, - target_addr: IPMI_BMC_SLAVE_ADDR, + .name = "free", + .desc = "FreeIPMI IPMI Interface", + .open = ipmi_free_open, + .close = ipmi_free_close, + .sendrecv = ipmi_free_send_cmd, + .target_addr = IPMI_BMC_SLAVE_ADDR, }; diff --git a/src/plugins/lipmi/lipmi.c b/src/plugins/lipmi/lipmi.c index fa7845d..f3db7ab 100644 --- a/src/plugins/lipmi/lipmi.c +++ b/src/plugins/lipmi/lipmi.c @@ -119,11 +119,11 @@ static struct ipmi_rs * ipmi_lipmi_send_cmd(struct ipmi_intf * intf, struct ipmi } struct ipmi_intf ipmi_lipmi_intf = { - name: "lipmi", - desc: "Solaris x86 LIPMI Interface", - open: ipmi_lipmi_open, - close: ipmi_lipmi_close, - sendrecv: ipmi_lipmi_send_cmd, - target_addr: IPMI_BMC_SLAVE_ADDR, + .name = "lipmi", + .desc = "Solaris x86 LIPMI Interface", + .open = ipmi_lipmi_open, + .close = ipmi_lipmi_close, + .sendrecv = ipmi_lipmi_send_cmd, + .target_addr = IPMI_BMC_SLAVE_ADDR, }; |