From dcc23979218781e5e7c0e28fa44c4dfc02a91327 Mon Sep 17 00:00:00 2001 From: Alex Elder Date: Fri, 1 Oct 2021 18:23:19 -0500 Subject: [PATCH] parser: use stderr for error messages Send error text output by yyerror() to stderr instead of stdout. Signed-off-by: Alex Elder Message-Id: <20211001232338.769309-16-elder@linaro.org> Signed-off-by: Bjorn Andersson --- parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parser.c b/parser.c index 0ec8e97..d374549 100644 --- a/parser.c +++ b/parser.c @@ -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);