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:
1 parent
22fc539edd
commit
67f0990530
2 files changed
+4
No files matched your search
@@ -193,6 +193,8 @@ value:
|
||||
}
|
||||
free($1);
|
||||
free($2);
|
||||
/* suppress compiler warning */
|
||||
(void)yynerrs;
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
@@ -201,6 +201,8 @@ value:
|
||||
}
|
||||
free($1);
|
||||
free($2);
|
||||
/* suppress compiler warning */
|
||||
(void)yynerrs;
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
Reference in new issue
Block a user