charsets: fix warnings with -Wswitch-default
mm-charsets.c: In function ‘mm_charset_take_and_convert_to_utf8’: mm-charsets.c:730:5: error: switch missing default case [-Werror=switch-default] 730 | switch (charset) { | ^~~~~~ mm-charsets.c: In function ‘mm_utf8_take_and_convert_to_charset’: mm-charsets.c:852:5: error: switch missing default case [-Werror=switch-default] 852 | switch (charset) { | ^~~~~~
This commit is contained in:
@@ -838,6 +838,9 @@ mm_charset_take_and_convert_to_utf8 (gchar *str, MMModemCharset charset)
|
||||
case MM_MODEM_CHARSET_UTF8:
|
||||
utf8 = str;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
/* Validate UTF-8 always before returning. This result will be exposed in DBus
|
||||
@@ -932,6 +935,9 @@ mm_utf8_take_and_convert_to_charset (gchar *str,
|
||||
case MM_MODEM_CHARSET_UTF8:
|
||||
encoded = str;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
return encoded;
|
||||
|
Reference in New Issue
Block a user