aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh_mpm.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-11-30 13:37:55 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-30 13:53:11 (GMT)
commit763041b2e8a1e06651b40f1c33f128e273b7ad6c (patch)
tree35f5a65deed41c076436410eceda79e7a1024aeb /wpa_supplicant/mesh_mpm.c
parentee27f6737bb62bbe8bfcf6a53cd8c3f1ea8bac00 (diff)
downloadhostap-763041b2e8a1e06651b40f1c33f128e273b7ad6c.zip
hostap-763041b2e8a1e06651b40f1c33f128e273b7ad6c.tar.gz
hostap-763041b2e8a1e06651b40f1c33f128e273b7ad6c.tar.bz2
mesh: Avoid a false maybe-uninitialized compiler warning
An earlier check of the action_field value above the switch statement already took care of all other possible cases, but that was apparently too difficult for the compiler to notice. Bring back the default case to avoid incorrect warnings about the event variable being maybe uninitialized. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/mesh_mpm.c')
-rw-r--r--wpa_supplicant/mesh_mpm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index e5b569e..2e5afd9 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -971,6 +971,13 @@ void mesh_mpm_action_rx(struct wpa_supplicant *wpa_s,
else
event = CLS_ACPT;
break;
+ default:
+ /*
+ * This cannot be hit due to the action_field check above, but
+ * compilers may not be able to figure that out and can warn
+ * about uninitialized event below.
+ */
+ return;
}
mesh_mpm_fsm(wpa_s, sta, event);
}