mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
WPrefs: Add case check to fix -Wmaybe-uninitialized warning
The default case should not arise because the tested variable is an enum, but it the case someone would get a value wrong, we're safer with a little warning and proper fallback than with unknown behaviour. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
54f9e2e9cc
commit
0d66173e1f
@@ -138,6 +138,13 @@ static void createPanel(Panel * p)
|
||||
state = WMGetUDBoolForKey(udb, expert_options[i].op_name);
|
||||
break;
|
||||
|
||||
default:
|
||||
#ifdef DEBUG
|
||||
wwarning("export_options[%d].class = %d, this should not happen\n",
|
||||
i, expert_options[i].class);
|
||||
#endif
|
||||
state = expert_options[i].def_state;
|
||||
break;
|
||||
}
|
||||
WMSetButtonSelected(panel->swi[i], state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user