From: Sebastian Harl Date: Mon, 2 Mar 2015 06:41:55 +0000 (+0100) Subject: frontend/grammar: Fixed format argument used in yyerrorf(). X-Git-Tag: sysdb-0.8.0~142 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ef6a58a4a7ee15d97b1c1b717f4c7324f73cfab7;p=sysdb.git frontend/grammar: Fixed format argument used in yyerrorf(). --- diff --git a/src/frontend/grammar.y b/src/frontend/grammar.y index db3df64..e36df3b 100644 --- a/src/frontend/grammar.y +++ b/src/frontend/grammar.y @@ -580,7 +580,7 @@ expression: if (! $1) { /* we should have better error messages here * TODO: maybe let the analyzer handle this instead */ - sdb_fe_yyerrorf(&yylloc, scanner, + sdb_fe_yyerror(&yylloc, scanner, YY_("syntax error, invalid arithmetic expression")); YYABORT; } @@ -858,7 +858,7 @@ sdb_fe_yyerrorf(YYLTYPE *lval, sdb_fe_yyscan_t scanner, const char *fmt, ...) va_start(ap, fmt); va_copy(aq, ap); sdb_vlog(SDB_LOG_ERR, fmt, ap); - sdb_strbuf_vsprintf(errbuf, "%s", aq); + sdb_strbuf_vsprintf(errbuf, fmt, aq); va_end(ap); } /* sdb_fe_yyerrorf */