From: Christophe CURIS <[email protected]> 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 <[email protected]> --- WPrefs.app/Expert.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c index 582013e..e939df0 100644 --- a/WPrefs.app/Expert.c +++ b/WPrefs.app/Expert.c @@ -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); } -- 1.8.4.rc3 -- To unsubscribe, send mail to [email protected].
