public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaud Lacombe <lacombar@gmail.com>
To: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Michal Marek <mmarek@suse.cz>, Arnaud Lacombe <lacombar@gmail.com>
Subject: [PATCH 1/9] kconfig: annotate non-trivial fall-trough
Date: Mon,  6 Jun 2011 14:58:23 -0400	[thread overview]
Message-ID: <1307386711-8866-2-git-send-email-lacombar@gmail.com> (raw)
In-Reply-To: <1307386711-8866-1-git-send-email-lacombar@gmail.com>

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
---
 scripts/kconfig/conf.c     |    4 ++++
 scripts/kconfig/confdata.c |    5 +++++
 scripts/kconfig/gconf.c    |    1 +
 scripts/kconfig/mconf.c    |    1 +
 4 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 006ad81..8be7374 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -106,6 +106,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
 			return 0;
 		}
 		check_stdin();
+		/* FALLTHOUGH */
 	case oldaskconfig:
 		fflush(stdout);
 		xfgets(line, 128, stdin);
@@ -150,6 +151,7 @@ static int conf_string(struct menu *menu)
 				def = NULL;
 				break;
 			}
+			/* FALLTHOUGH */
 		default:
 			line[strlen(line)-1] = 0;
 			def = line;
@@ -304,6 +306,7 @@ static int conf_choice(struct menu *menu)
 				break;
 			}
 			check_stdin();
+			/* FALLTHOUGH */
 		case oldaskconfig:
 			fflush(stdout);
 			xfgets(line, 128, stdin);
@@ -369,6 +372,7 @@ static void conf(struct menu *menu)
 				check_conf(menu);
 				return;
 			}
+			/* FALLTHOUGH */
 		case P_COMMENT:
 			prompt = menu_get_prompt(menu);
 			if (prompt)
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 2bafd9a..3693ac7 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -128,6 +128,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
 			sym->flags |= def_flags;
 			break;
 		}
+		/* FALLTHOUGH */
 	case S_BOOLEAN:
 		if (p[0] == 'y') {
 			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)
 			sym->type = S_STRING;
 			goto done;
 		}
+		/* FALLTHOUGH */
 	case S_STRING:
 		if (*p++ != '"')
 			break;
@@ -162,6 +164,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
 			conf_warning("invalid string found");
 			return 1;
 		}
+		/* FALLTHOUGH */
 	case S_INT:
 	case S_HEX:
 	done:
@@ -237,6 +240,7 @@ load:
 		case S_STRING:
 			if (sym->def[def].val)
 				free(sym->def[def].val);
+			/* FALLTHOUGH */
 		default:
 			sym->def[def].val = NULL;
 			sym->def[def].tri = no;
@@ -363,6 +367,7 @@ int conf_read(const char *name)
 					break;
 				if (!sym_is_choice(sym))
 					goto sym_ok;
+				/* FALLTHOUGH */
 			default:
 				if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
 					goto sym_ok;
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index a11d5f7..79e9806 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -1172,6 +1172,7 @@ static gchar **fill_row(struct menu *menu)
 			row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
 		if (sym_is_choice(sym))
 			break;
+		/* FALLTHOUGH */
 	case S_TRISTATE:
 		val = sym_get_tristate_value(sym);
 		switch (val) {
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index d433c7a..fa0ae0e 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -845,6 +845,7 @@ int main(int ac, char **av)
 				"\n\n"));
 			return 1;
 		}
+		/* FALLTHOUGH */
 	case -1:
 		printf(_("\n\n"
 			"*** End of the configuration.\n"
-- 
1.7.3.4.574.g608b.dirty


  reply	other threads:[~2011-06-06 18:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 18:58 [PATCH 0/9] Random kconfig patches Arnaud Lacombe
2011-06-06 18:58 ` Arnaud Lacombe [this message]
2011-06-06 19:08   ` [PATCH 1/9] kconfig: annotate non-trivial fall-trough Daniel K.
2011-06-06 19:34     ` Arnaud Lacombe
2011-06-06 18:58 ` [PATCH 2/9] kconfig: fix return code for invalid boolean symbol in conf_set_sym_val() Arnaud Lacombe
2011-06-06 18:58 ` [PATCH 3/9] kconfig: add missing <stdarg.h> inclusion Arnaud Lacombe
2011-06-06 18:58 ` [PATCH 4/9] kconfig: add missing <ctype.h> inclusion Arnaud Lacombe
2011-06-06 18:58 ` [PATCH 5/9] kconfig: add missing <stdlib.h> inclusion Arnaud Lacombe
2011-06-06 18:58 ` [PATCH 6/9] kconfig: nuke reference to SWIG Arnaud Lacombe
2011-06-06 18:58 ` [PATCH 7/9] kconfig: nuke LKC_DIRECT_LINK cruft Arnaud Lacombe
2011-06-06 18:58 ` [PATCH 8/9] kconfig/gconf: kill deadcode Arnaud Lacombe
2011-06-06 18:58 ` [PATCH 9/9] kconfig/gconf: silent missing prototype warnings Arnaud Lacombe
2011-06-08 16:03 ` [PATCH 0/9] Random kconfig patches Michal Marek
2011-07-02  5:10 ` [PATCH 0/5] Random kconfig patches (second iteration) Arnaud Lacombe
2011-07-02  5:10   ` [PATCH 1/5] kconfig: use calloc() for expr allocation Arnaud Lacombe
2011-07-02  5:10   ` [PATCH 2/5] kconfig/conf: reduce the scope of `defconfig_file' Arnaud Lacombe
2011-07-02  5:10   ` [PATCH 3/5] kconfig/conf: add command line options' description Arnaud Lacombe
2011-07-02  5:10   ` [PATCH 4/5] kconfig: remove pending prototypes for kconfig_load() Arnaud Lacombe
2011-07-02  5:10   ` [PATCH 5/5] kconfig/conf: mark xfgets() private Arnaud Lacombe
2011-07-04  9:39   ` [PATCH 0/5] Random kconfig patches (second iteration) Michal Marek
2011-07-08  1:31     ` Arnaud Lacombe
2011-07-12  9:04       ` Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1307386711-8866-2-git-send-email-lacombar@gmail.com \
    --to=lacombar@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox