mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +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:
parent
83ec81789a
commit
aa689b96e6
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue