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>
This commit is contained in:
parent
ee27f6737b
commit
763041b2e8
1 changed files with 7 additions and 0 deletions
|
@ -971,6 +971,13 @@ void mesh_mpm_action_rx(struct wpa_supplicant *wpa_s,
|
||||||
else
|
else
|
||||||
event = CLS_ACPT;
|
event = CLS_ACPT;
|
||||||
break;
|
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);
|
mesh_mpm_fsm(wpa_s, sta, event);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue