Suppress compiler warnings with specific bison and compiler combinations

Bison generates code that only increases the yynerrs counter, it's never
read.  This causes a warning in newer compilers (in particular clang).
Newer versions of bison mark yynerrs with __attribute__((unused)), but
at least on FreeBSD 14 that's not yet available.
This commit is contained in:
Tobias Brunner
2024-01-16 11:00:29 +01:00
parent 22fc539edd
commit 67f0990530
2 changed files with 4 additions and 0 deletions
@@ -193,6 +193,8 @@ value:
}
free($1);
free($2);
/* suppress compiler warning */
(void)yynerrs;
}
;
+2
View File
@@ -201,6 +201,8 @@ value:
}
free($1);
free($2);
/* suppress compiler warning */
(void)yynerrs;
}
;