mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
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:
parent
46a12eaf23
commit
aeed676c08
@ -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;
|
||||||
|
@ -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 &&
|
||||||
|
@ -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 '?':
|
||||||
|
Loading…
Reference in New Issue
Block a user