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:
Aleksander Morgado
2020-01-11 13:54:03 +01:00
parent 7619148aa5
commit 6dfb9d7a7e

View File

@@ -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;