broadband-modem-qmi: fix warnings with -Wswitch-enum
mm-broadband-modem-qmi.c: In function ‘uim_get_card_status_output_parse’:
mm-broadband-modem-qmi.c:846:5: error: enumeration value ‘QMI_UIM_PIN_STATE_NOT_INITIALIZED’ not handled in switch [-Werror=switch-enum]
846 | switch (app->pin1_state) {
| ^~~~~~
mm-broadband-modem-qmi.c:877:9: error: enumeration value ‘QMI_UIM_PIN_STATE_NOT_INITIALIZED’ not handled in switch [-Werror=switch-enum]
877 | switch (app->pin2_state) {
| ^~~~~~
...
This commit is contained in:
@@ -844,6 +844,13 @@ uim_get_card_status_output_parse (QmiMessageUimGetCardStatusOutput *output,
|
||||
|
||||
/* PIN1 */
|
||||
switch (app->pin1_state) {
|
||||
case QMI_UIM_PIN_STATE_NOT_INITIALIZED:
|
||||
g_set_error (error,
|
||||
MM_MOBILE_EQUIPMENT_ERROR,
|
||||
MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG,
|
||||
"SIM PIN/PUK status not known yet");
|
||||
return FALSE;
|
||||
|
||||
case QMI_UIM_PIN_STATE_PERMANENTLY_BLOCKED:
|
||||
g_set_error (error,
|
||||
MM_MOBILE_EQUIPMENT_ERROR,
|
||||
@@ -875,6 +882,10 @@ uim_get_card_status_output_parse (QmiMessageUimGetCardStatusOutput *output,
|
||||
/* PIN2 */
|
||||
if (lock == MM_MODEM_LOCK_NONE) {
|
||||
switch (app->pin2_state) {
|
||||
case QMI_UIM_PIN_STATE_NOT_INITIALIZED:
|
||||
mm_warn ("SIM PIN2/PUK2 status not known yet");
|
||||
break;
|
||||
|
||||
case QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED:
|
||||
lock = MM_MODEM_LOCK_SIM_PIN2;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user