From: Hugo Villeneuve Date: Fri, 3 Jan 2014 08:19:32 +0000 (-0500) Subject: Fix warning for ignored return value for getline() X-Git-Tag: v2.0.0~14 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=290e4eb58e811c97ed2ad7164998349bf54d8742;p=emu8051.git Fix warning for ignored return value for getline() --- diff --git a/src/cli/emuconsole.c b/src/cli/emuconsole.c index 1e53620..ab85975 100644 --- a/src/cli/emuconsole.c +++ b/src/cli/emuconsole.c @@ -305,6 +305,7 @@ console_main(void) while (!QuitRequest) { int slen; size_t len = 0; + int rc; char Command[256]; char Args[256]; char Parameter1[256]; @@ -314,7 +315,10 @@ console_main(void) Parameter2[0] = '\0'; printf("%s", prompt); - (void) getline(&line, &len, stdin); + rc = getline(&line, &len, stdin); + if (rc < 0) + goto syntax_error; + Capitalize(line); RemoveSpaces(line);