Skip to content

Commit d8fc320

Browse files
committed
kconfig: annotate non-trivial fall-trough
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
1 parent 55922c9 commit d8fc320

4 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎scripts/kconfig/conf.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
106106
return 0;
107107
}
108108
check_stdin();
109+
/* fall through */
109110
case oldaskconfig:
110111
fflush(stdout);
111112
xfgets(line, 128, stdin);
@@ -150,6 +151,7 @@ static int conf_string(struct menu *menu)
150151
def = NULL;
151152
break;
152153
}
154+
/* fall through */
153155
default:
154156
line[strlen(line)-1] = 0;
155157
def = line;
@@ -304,6 +306,7 @@ static int conf_choice(struct menu *menu)
304306
break;
305307
}
306308
check_stdin();
309+
/* fall through */
307310
case oldaskconfig:
308311
fflush(stdout);
309312
xfgets(line, 128, stdin);
@@ -369,6 +372,7 @@ static void conf(struct menu *menu)
369372
check_conf(menu);
370373
return;
371374
}
375+
/* fall through */
372376
case P_COMMENT:
373377
prompt = menu_get_prompt(menu);
374378
if (prompt)

‎scripts/kconfig/confdata.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
128128
sym->flags |= def_flags;
129129
break;
130130
}
131+
/* fall through */
131132
case S_BOOLEAN:
132133
if (p[0] == 'y') {
133134
sym->def[def].tri = yes;
@@ -148,6 +149,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
148149
sym->type = S_STRING;
149150
goto done;
150151
}
152+
/* fall through */
151153
case S_STRING:
152154
if (*p++ != '"')
153155
break;
@@ -162,6 +164,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
162164
conf_warning("invalid string found");
163165
return 1;
164166
}
167+
/* fall through */
165168
case S_INT:
166169
case S_HEX:
167170
done:
@@ -237,6 +240,7 @@ int conf_read_simple(const char *name, int def)
237240
case S_STRING:
238241
if (sym->def[def].val)
239242
free(sym->def[def].val);
243+
/* fall through */
240244
default:
241245
sym->def[def].val = NULL;
242246
sym->def[def].tri = no;
@@ -363,6 +367,7 @@ int conf_read(const char *name)
363367
break;
364368
if (!sym_is_choice(sym))
365369
goto sym_ok;
370+
/* fall through */
366371
default:
367372
if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
368373
goto sym_ok;

‎scripts/kconfig/gconf.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,7 @@ static gchar **fill_row(struct menu *menu)
11721172
row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
11731173
if (sym_is_choice(sym))
11741174
break;
1175+
/* fall through */
11751176
case S_TRISTATE:
11761177
val = sym_get_tristate_value(sym);
11771178
switch (val) {

‎scripts/kconfig/mconf.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,7 @@ int main(int ac, char **av)
845845
"\n\n"));
846846
return 1;
847847
}
848+
/* fall through */
848849
case -1:
849850
printf(_("\n\n"
850851
"*** End of the configuration.\n"

0 commit comments

Comments
 (0)