Replace fallthrough comments with G_GNUC_FALLTHROUGH

It's safer to do it this way and since we have G_GNUC_FALLTHROUGH now, w
e might as well replace the fallthrough comments.
This commit is contained in:
Timm Bäder 2020-03-04 09:48:15 +01:00
parent b72acc9c6e
commit e5ab441b0d
6 changed files with 8 additions and 7 deletions

View File

@ -1142,7 +1142,8 @@ g_date_prepare_to_parse (const gchar *str,
dmy_order[i] = G_DATE_DAY;
break;
case 76:
using_twodigit_years = TRUE; /* FALL THRU */
using_twodigit_years = TRUE;
G_GNUC_FALLTHROUGH;
case 1976:
dmy_order[i] = G_DATE_YEAR;
break;

View File

@ -1955,7 +1955,7 @@ g_scanner_get_token_ll (GScanner *scanner,
}
else
ch = '0';
/* fall through */
G_GNUC_FALLTHROUGH;
case '1':
case '2':
case '3':

View File

@ -523,7 +523,7 @@ tokenize_command_line (const gchar *command_line,
ensure_token (&current_token);
g_string_append_c (current_token, *p);
/* FALL THRU */
G_GNUC_FALLTHROUGH;
case '\\':
current_quote = *p;
break;

View File

@ -310,6 +310,7 @@ g_slice_set_config (GSliceConfig ckey,
break;
case G_SLICE_CONFIG_COLOR_INCREMENT:
slice_config.color_increment = value;
break;
default: ;
}
}

View File

@ -2255,8 +2255,7 @@ g_execute (const gchar *file,
*/
got_eacces = TRUE;
/* FALL THRU */
G_GNUC_FALLTHROUGH;
case ENOENT:
#ifdef ESTALE
case ESTALE:

View File

@ -4466,7 +4466,7 @@ g_variant_check_format_string (GVariant *value,
return FALSE;
}
/* fall through */
G_GNUC_FALLTHROUGH;
case '^':
case '@':
/* ignore these 2 (or 3) */
@ -4487,7 +4487,7 @@ g_variant_check_format_string (GVariant *value,
if (*type_string != '(')
return FALSE;
/* fall through */
G_GNUC_FALLTHROUGH;
case '*':
/* consume a full type string for the '*' or 'r' */
if (!g_variant_type_string_scan (type_string, NULL, &type_string))