diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-11 13:54:03 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-01-31 14:52:49 +0100 |
commit | 6dfb9d7a7e1f53e5aac3f28b2f6a249db0dd2b4c (patch) | |
tree | ddf039c1b27b067fa8fc636f64ab10c3dee3b2e7 | |
parent | 7619148aa5364f6ff2aea3914690c4db81f2c786 (diff) |
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) {
| ^~~~~~
-rw-r--r-- | src/mm-charsets.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mm-charsets.c b/src/mm-charsets.c index c93bae69..a5c70165 100644 --- a/src/mm-charsets.c +++ b/src/mm-charsets.c @@ -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; |