summaryrefslogtreecommitdiff
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorJavier Viguera <javier.viguera@digi.com>2009-10-05 20:35:54 +0200
committerJavier Viguera <javier.viguera@digi.com>2010-04-14 18:16:07 +0200
commit28c3014ec01841d41319b9cdb449edc43b7e2d98 (patch)
tree89739aaaa545173c3b42b6e9334a9a723d29ae6f /scripts/kconfig
parent46c27d2a492fb2fb8ffabd35ed2cfb593193c9ab (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>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/conf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 3baaaecd6b13..fc40f713cd76 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] == '?') {
printf("\n%s\n", get_help(menu));