-Wextra reveals missing initializer warnings. Resolve them.
Signed-off-by: Mark Rustad <[email protected]>
Tested-by: Jack Morgan<[email protected]>
---
fcnsq.c | 3 +++
lib/fip.c | 12 ++++++++----
lib/sa_select.c | 9 ++++++---
3 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/fcnsq.c b/fcnsq.c
index e5abeb9..a4a88cf 100644
--- a/fcnsq.c
+++ b/fcnsq.c
@@ -204,6 +204,7 @@ static u16 gn_id(int bsg, u32 fcid, u16 cmd, u64 *wwn)
.ct_fs_subtype = FC_NS_SUBTYPE,
.ct_cmd = htons(cmd),
.ct_mr_size = htons(sizeof(gn_resp)),
+ .ct_vendor = 0,
},
.port_id = hton24(fcid),
};
@@ -278,6 +279,7 @@ static int gspn_id(int bsg, u32 fcid)
.ct_fs_subtype = FC_NS_SUBTYPE,
.ct_cmd = htons(FC_NS_GSPN_ID),
.ct_mr_size = htons(sizeof(gspn_resp)),
+ .ct_vendor = 0,
},
.port_id = hton24(fcid),
};
@@ -315,6 +317,7 @@ static int gsnn_nn(int bsg, u64 wwnn)
.ct_fs_subtype = FC_NS_SUBTYPE,
.ct_cmd = htons(FC_NS_GSNN_NN),
.ct_mr_size = htons(sizeof(gsnn_resp)),
+ .ct_vendor = 0,
},
.wwnn = htonll(wwnn),
};
diff --git a/lib/fip.c b/lib/fip.c
index 7a5d836..cd23fd7 100644
--- a/lib/fip.c
+++ b/lib/fip.c
@@ -263,8 +263,10 @@ ssize_t fip_send_vlan_request(int s, int ifindex, const
unsigned char *mac,
struct fip_tlv_mac_addr mac;
} tlvs = {
.mac = {
- .hdr.tlv_type = FIP_TLV_MAC_ADDR,
- .hdr.tlv_len = 2,
+ .hdr = {
+ .tlv_type = FIP_TLV_MAC_ADDR,
+ .tlv_len = 2,
+ },
},
};
struct ethhdr eh;
@@ -326,8 +328,10 @@ fip_send_vlan_notification(int s, int ifindex, const __u8
*mac,
struct fip_tlv_mac_addr mac;
} tlvs = {
.mac = {
- .hdr.tlv_type = FIP_TLV_MAC_ADDR,
- .hdr.tlv_len = 2,
+ .hdr = {
+ .tlv_type = FIP_TLV_MAC_ADDR,
+ .tlv_len = 2,
+ },
},
};
struct ethhdr eh;
diff --git a/lib/sa_select.c b/lib/sa_select.c
index 126203e..80f6454 100644
--- a/lib/sa_select.c
+++ b/lib/sa_select.c
@@ -83,24 +83,27 @@ int sa_select_loop(void)
if (fp->ts_rx_handler != NULL)
(*fp->ts_rx_handler)
(fp->ts_handler_arg);
- else
+ else {
ASSERT(!FD_ISSET(i, &ss->ts_rx_fds));
+ }
--rv;
}
if (FD_ISSET(i, &tx_fds)) {
if (fp->ts_tx_handler != NULL)
(*fp->ts_tx_handler)
(fp->ts_handler_arg);
- else
+ else {
ASSERT(!FD_ISSET(i, &ss->ts_tx_fds));
+ }
--rv;
}
if (FD_ISSET(i, &ex_fds)) {
if (fp->ts_ex_handler != NULL)
(*fp->ts_ex_handler)
(fp->ts_handler_arg);
- else
+ else {
ASSERT(!FD_ISSET(i, &ss->ts_ex_fds));
+ }
--rv;
}
}
_______________________________________________
fcoe-devel mailing list
[email protected]
http://lists.open-fcoe.org/mailman/listinfo/fcoe-devel