FST: Get rid of gcc extensions in structure/array initialization

These constructions were causing warnings when build with clang.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2016-01-15 18:40:21 +02:00 committed by Jouni Malinen
parent 2e3a41a53f
commit c6e0b4bb86
3 changed files with 22 additions and 19 deletions

View file

@ -14,27 +14,28 @@
static const char *session_event_names[] = { static const char *session_event_names[] = {
[EVENT_FST_ESTABLISHED] FST_PVAL_EVT_TYPE_ESTABLISHED, [EVENT_FST_ESTABLISHED] = FST_PVAL_EVT_TYPE_ESTABLISHED,
[EVENT_FST_SETUP] FST_PVAL_EVT_TYPE_SETUP, [EVENT_FST_SETUP] = FST_PVAL_EVT_TYPE_SETUP,
[EVENT_FST_SESSION_STATE_CHANGED] FST_PVAL_EVT_TYPE_SESSION_STATE, [EVENT_FST_SESSION_STATE_CHANGED] = FST_PVAL_EVT_TYPE_SESSION_STATE,
}; };
static const char *reason_names[] = { static const char *reason_names[] = {
[REASON_TEARDOWN] FST_CS_PVAL_REASON_TEARDOWN, [REASON_TEARDOWN] = FST_CS_PVAL_REASON_TEARDOWN,
[REASON_SETUP] FST_CS_PVAL_REASON_SETUP, [REASON_SETUP] = FST_CS_PVAL_REASON_SETUP,
[REASON_SWITCH] FST_CS_PVAL_REASON_SWITCH, [REASON_SWITCH] = FST_CS_PVAL_REASON_SWITCH,
[REASON_STT] FST_CS_PVAL_REASON_STT, [REASON_STT] = FST_CS_PVAL_REASON_STT,
[REASON_REJECT] FST_CS_PVAL_REASON_REJECT, [REASON_REJECT] = FST_CS_PVAL_REASON_REJECT,
[REASON_ERROR_PARAMS] FST_CS_PVAL_REASON_ERROR_PARAMS, [REASON_ERROR_PARAMS] = FST_CS_PVAL_REASON_ERROR_PARAMS,
[REASON_RESET] FST_CS_PVAL_REASON_RESET, [REASON_RESET] = FST_CS_PVAL_REASON_RESET,
[REASON_DETACH_IFACE] FST_CS_PVAL_REASON_DETACH_IFACE, [REASON_DETACH_IFACE] = FST_CS_PVAL_REASON_DETACH_IFACE,
}; };
static const char *session_state_names[] = { static const char *session_state_names[] = {
[FST_SESSION_STATE_INITIAL] FST_CS_PVAL_STATE_INITIAL, [FST_SESSION_STATE_INITIAL] = FST_CS_PVAL_STATE_INITIAL,
[FST_SESSION_STATE_SETUP_COMPLETION] FST_CS_PVAL_STATE_SETUP_COMPLETION, [FST_SESSION_STATE_SETUP_COMPLETION] =
[FST_SESSION_STATE_TRANSITION_DONE] FST_CS_PVAL_STATE_TRANSITION_DONE, FST_CS_PVAL_STATE_SETUP_COMPLETION,
[FST_SESSION_STATE_TRANSITION_CONFIRMED] [FST_SESSION_STATE_TRANSITION_DONE] = FST_CS_PVAL_STATE_TRANSITION_DONE,
[FST_SESSION_STATE_TRANSITION_CONFIRMED] =
FST_CS_PVAL_STATE_TRANSITION_CONFIRMED, FST_CS_PVAL_STATE_TRANSITION_CONFIRMED,
}; };

View file

@ -648,9 +648,9 @@ static int list_groups(const char *cmd, char *buf, size_t buflen)
static const char * band_freq(enum mb_band_id band) static const char * band_freq(enum mb_band_id band)
{ {
static const char *band_names[] = { static const char *band_names[] = {
[MB_BAND_ID_WIFI_2_4GHZ] "2.4GHZ", [MB_BAND_ID_WIFI_2_4GHZ] = "2.4GHZ",
[MB_BAND_ID_WIFI_5GHZ] "5GHZ", [MB_BAND_ID_WIFI_5GHZ] = "5GHZ",
[MB_BAND_ID_WIFI_60GHZ] "60GHZ", [MB_BAND_ID_WIFI_60GHZ] = "60GHZ",
}; };
return fst_get_str_name(band, band_names, ARRAY_SIZE(band_names)); return fst_get_str_name(band, band_names, ARRAY_SIZE(band_names));

View file

@ -525,7 +525,9 @@ static void fst_session_handle_setup_response(struct fst_session *s,
enum hostapd_hw_mode hw_mode; enum hostapd_hw_mode hw_mode;
u8 channel; u8 channel;
union fst_session_state_switch_extra evext = { union fst_session_state_switch_extra evext = {
.to_initial = {0}, .to_initial = {
.reject_code = 0,
},
}; };
if (iface != s->data.old_iface) { if (iface != s->data.old_iface) {