parser: use stderr for error messages

Send error text output by yyerror() to stderr instead of stdout.

Signed-off-by: Alex Elder <elder@linaro.org>
Message-Id: <20211001232338.769309-16-elder@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Alex Elder
2021-10-01 18:23:19 -05:00
committed by Bjorn Andersson
parent dcec18722a
commit dcc2397921

View File

@@ -49,9 +49,9 @@ static void yyerror(const char *fmt, ...)
va_start(ap, fmt);
printf("parse error on line %u:\n\t", yyline);
vprintf(fmt, ap);
printf("\n");
fprintf(stderr, "parse error on line %u:\n\t", yyline);
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
va_end(ap);