Replace a bunch of fallthrough comments with an attribute

Parsing comments is hack and clang doesn't do it, so switch to
G_GNUC_FALLTHROUGH, which exists for exactly this case.
This commit is contained in:
Timm Bäder 2020-08-21 05:50:02 +02:00
parent 46a12eaf23
commit aeed676c08
3 changed files with 4 additions and 4 deletions

View File

@ -491,7 +491,7 @@ g_io_channel_new_file (const gchar *filename,
mode_num |= MODE_PLUS; mode_num |= MODE_PLUS;
break; break;
} }
/* Fall through */ G_GNUC_FALLTHROUGH;
default: default:
g_warning ("Invalid GIOFileMode %s.", mode); g_warning ("Invalid GIOFileMode %s.", mode);
return NULL; return NULL;

View File

@ -1378,7 +1378,7 @@ g_scanner_unexp_token (GScanner *scanner,
_g_snprintf (token_string, token_string_len, "(unknown) token <%d>", scanner->token); _g_snprintf (token_string, token_string_len, "(unknown) token <%d>", scanner->token);
break; break;
} }
/* fall through */ G_GNUC_FALLTHROUGH;
case G_TOKEN_SYMBOL: case G_TOKEN_SYMBOL:
if (expected_token == G_TOKEN_SYMBOL || if (expected_token == G_TOKEN_SYMBOL ||
(scanner->config->symbol_2_token && (scanner->config->symbol_2_token &&
@ -1523,7 +1523,7 @@ g_scanner_unexp_token (GScanner *scanner,
_g_snprintf (expected_string, expected_string_len, "(unknown) token <%d>", expected_token); _g_snprintf (expected_string, expected_string_len, "(unknown) token <%d>", expected_token);
break; break;
} }
/* fall through */ G_GNUC_FALLTHROUGH;
case G_TOKEN_SYMBOL: case G_TOKEN_SYMBOL:
need_valid = (scanner->token == G_TOKEN_SYMBOL || need_valid = (scanner->token == G_TOKEN_SYMBOL ||
(scanner->config->symbol_2_token && (scanner->config->symbol_2_token &&

View File

@ -4930,7 +4930,7 @@ g_variant_valist_get_nnp (const gchar **str,
case '@': case '@':
g_variant_type_string_scan (*str, NULL, str); g_variant_type_string_scan (*str, NULL, str);
/* fall through */ G_GNUC_FALLTHROUGH;
case '*': case '*':
case '?': case '?':