History

kconfig: annotate non-trivial fall-trough

Arnaud Lacombe committed 15 years ago

Commit d8fc3201 parent 55922c94 files · +11 −0Browse files

Showing the changes to scripts (4 of 4 files). Show all

Unified · Split

4 files
  1. scripts/kconfig/conf.c +4 −0
  2. scripts/kconfig/confdata.c +5 −0
  3. scripts/kconfig/gconf.c +1 −0
  4. scripts/kconfig/mconf.c +1 −0
scripts/kconfig/conf.c+4−0
@@ -106,6 +106,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) · 105 unmodified lines
106 return 0;106 return 0;
107 }107 }
108 check_stdin();108 check_stdin();
109 /* fall through */
109 case oldaskconfig:110 case oldaskconfig:
110 fflush(stdout);111 fflush(stdout);
111 xfgets(line, 128, stdin);112 xfgets(line, 128, stdin);
@@ -150,6 +151,7 @@ static int conf_string(struct menu *menu) · 38 unmodified lines
150 def = NULL;151 def = NULL;
151 break;152 break;
152 }153 }
154 /* fall through */
153 default:155 default:
154 line[strlen(line)-1] = 0;156 line[strlen(line)-1] = 0;
155 def = line;157 def = line;
@@ -304,6 +306,7 @@ static int conf_choice(struct menu *menu) · 148 unmodified lines
304 break;306 break;
305 }307 }
306 check_stdin();308 check_stdin();
309 /* fall through */
307 case oldaskconfig:310 case oldaskconfig:
308 fflush(stdout);311 fflush(stdout);
309 xfgets(line, 128, stdin);312 xfgets(line, 128, stdin);
@@ -369,6 +372,7 @@ static void conf(struct menu *menu) · 59 unmodified lines
369 check_conf(menu);372 check_conf(menu);
370 return;373 return;
371 }374 }
375 /* fall through */
372 case P_COMMENT:376 case P_COMMENT:
373 prompt = menu_get_prompt(menu);377 prompt = menu_get_prompt(menu);
374 if (prompt)378 if (prompt)
scripts/kconfig/confdata.c+5−0
@@ -128,6 +128,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) · 127 unmodified lines
128 sym->flags |= def_flags;128 sym->flags |= def_flags;
129 break;129 break;
130 }130 }
131 /* fall through */
131 case S_BOOLEAN:132 case S_BOOLEAN:
132 if (p[0] == 'y') {133 if (p[0] == 'y') {
133 sym->def[def].tri = yes;134 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) · 14 unmodified lines
148 sym->type = S_STRING;149 sym->type = S_STRING;
149 goto done;150 goto done;
150 }151 }
152 /* fall through */
151 case S_STRING:153 case S_STRING:
152 if (*p++ != '"')154 if (*p++ != '"')
153 break;155 break;
@@ -162,6 +164,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) · 8 unmodified lines
162 conf_warning("invalid string found");164 conf_warning("invalid string found");
163 return 1;165 return 1;
164 }166 }
167 /* fall through */
165 case S_INT:168 case S_INT:
166 case S_HEX:169 case S_HEX:
167 done:170 done:
@@ -237,6 +240,7 @@ load: · 69 unmodified lines
237 case S_STRING:240 case S_STRING:
238 if (sym->def[def].val)241 if (sym->def[def].val)
239 free(sym->def[def].val);242 free(sym->def[def].val);
243 /* fall through */
240 default:244 default:
241 sym->def[def].val = NULL;245 sym->def[def].val = NULL;
242 sym->def[def].tri = no;246 sym->def[def].tri = no;
@@ -363,6 +367,7 @@ int conf_read(const char *name) · 120 unmodified lines
363 break;367 break;
364 if (!sym_is_choice(sym))368 if (!sym_is_choice(sym))
365 goto sym_ok;369 goto sym_ok;
370 /* fall through */
366 default:371 default:
367 if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))372 if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
368 goto sym_ok;373 goto sym_ok;
scripts/kconfig/gconf.c+1−0
@@ -1172,6 +1172,7 @@ static gchar **fill_row(struct menu *menu) · 1171 unmodified lines
1172 row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);1172 row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
1173 if (sym_is_choice(sym))1173 if (sym_is_choice(sym))
1174 break;1174 break;
1175 /* fall through */
1175 case S_TRISTATE:1176 case S_TRISTATE:
1176 val = sym_get_tristate_value(sym);1177 val = sym_get_tristate_value(sym);
1177 switch (val) {1178 switch (val) {
scripts/kconfig/mconf.c+1−0
@@ -845,6 +845,7 @@ int main(int ac, char **av) · 844 unmodified lines
845 "\n\n"));845 "\n\n"));
846 return 1;846 return 1;
847 }847 }
848 /* fall through */
848 case -1:849 case -1:
849 printf(_("\n\n"850 printf(_("\n\n"
850 "*** End of the configuration.\n"851 "*** End of the configuration.\n"