diff options
author | Javier Viguera <javier.viguera@digi.com> | 2009-10-05 20:35:54 +0200 |
---|---|---|
committer | Hector Palacios <hector.palacios@digi.com> | 2011-01-20 13:52:10 +0100 |
commit | 4080809079651216230566377c563a463ab10f30 (patch) | |
tree | 36cb32cde4cc2d1e00c5060ca97dfa49161d5341 /scripts | |
parent | 0977c0d5339fd20ff471076f344a8679e1166186 (diff) |
kconfig: clean compiler warnings
Dirty hack to avoid compiler warnings such as:
warning: ignoring return value of ‘fgets’, declared with attribute
warn_unused_result
warning: ignoring return value of ‘asprintf’, declared with attribute
warn_unused_result
This happens with gcc-4.3, but not with previous versions of gcc. Our
base distribution for Digi Embedded Linux (kubuntu) uses gcc-4.3 as
host compiler so for now we need this hack to avoid customers getting
warnings on kernel compilation.
This must be removed when upstream fixes the warnings or we update our
base distribution to a newer version of gcc.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kconfig/conf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 9960d1c303f8..380d65187a03 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -102,7 +102,8 @@ static int conf_askvalue(struct symbol *sym, const char *def) check_stdin(); case ask_all: fflush(stdout); - fgets(line, 128, stdin); + /* JVS: check return value to avoid compiler warning */ + if (fgets(line, 128, stdin) == NULL) ; return 1; default: break; @@ -304,7 +305,8 @@ static int conf_choice(struct menu *menu) check_stdin(); case ask_all: fflush(stdout); - fgets(line, 128, stdin); + /* JVS: check return value to avoid compiler warning */ + if (fgets(line, 128, stdin) == NULL) ; strip(line); if (line[0] == '?') { print_help(menu); |