1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

nix-expr/parser: Suppress warning

We rely on `yyerror()` instead.

> The variable yynerrs contains the number of syntax errors reported so
> far.
> Normally this variable is global; but if you request a pure parser
> (see A Pure (Reentrant) Parser) then it is a local variable which only
> the actions can access.

https://www.gnu.org/software/bison/manual/html_node/Error-Reporting-Function.html
This commit is contained in:
Robert Hensing 2025-03-27 14:55:51 +00:00
parent 83ec81789a
commit aa689b96e6

View file

@ -179,7 +179,12 @@ static Expr * makeCall(PosIdx pos, Expr * fn, Expr * arg) {
%%
start: expr { state->result = $1; };
start: expr {
state->result = $1;
// This parser does not use yynerrs; suppress the warning.
(void) yynerrs;
};
expr: expr_function;