From d8fc320079b46cf462897148f48d4a63f37f56ce Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Tue, 31 May 2011 12:30:26 -0400 Subject: kconfig: annotate non-trivial fall-trough Signed-off-by: Arnaud Lacombe --- scripts/kconfig/confdata.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/kconfig/confdata.c') diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 2bafd9a7c8da..0a1ccc397b86 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; } + /* fall through */ 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; } + /* fall through */ 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; } + /* fall through */ 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); + /* fall through */ 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; + /* fall through */ default: if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) goto sym_ok; -- cgit From 75f1468beaeca690e139b4e1bcd19aa20973fca9 Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Tue, 31 May 2011 12:31:57 -0400 Subject: kconfig: fix return code for invalid boolean symbol in conf_set_sym_val() Cc: Sam Ravnborg Signed-off-by: Arnaud Lacombe --- scripts/kconfig/confdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/kconfig/confdata.c') diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 0a1ccc397b86..4e878dda1add 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -141,7 +141,7 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) break; } conf_warning("symbol value '%s' invalid for %s", p, sym->name); - break; + return 1; case S_OTHER: if (*p != '"') { for (p2 = p; *p2 && !isspace(*p2); p2++) -- cgit From 10a4b2772e7643247ddb5316c644f1fe7c4dccca Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Wed, 1 Jun 2011 16:00:46 -0400 Subject: kconfig: add missing inclusion This header is needed when using va_{start,end,copy}(3) functions family. Signed-off-by: Arnaud Lacombe --- scripts/kconfig/confdata.c | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/kconfig/confdata.c') diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 4e878dda1add..ca16ab4367dd 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include -- cgit From 5a6f8d2bd9e3392569ed6f29ea4d7210652f929b Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Wed, 1 Jun 2011 16:14:47 -0400 Subject: kconfig: nuke LKC_DIRECT_LINK cruft This interface is not (and has never been ?) used by any frontend, just get rid of it. Signed-off-by: Arnaud Lacombe --- scripts/kconfig/confdata.c | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts/kconfig/confdata.c') diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index ca16ab4367dd..c257bb0bf90a 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -14,7 +14,6 @@ #include #include -#define LKC_DIRECT_LINK #include "lkc.h" static void conf_warning(const char *fmt, ...) -- cgit