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:
@@ -193,6 +193,8 @@ value:
|
|||||||
}
|
}
|
||||||
free($1);
|
free($1);
|
||||||
free($2);
|
free($2);
|
||||||
|
/* suppress compiler warning */
|
||||||
|
(void)yynerrs;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -201,6 +201,8 @@ value:
|
|||||||
}
|
}
|
||||||
free($1);
|
free($1);
|
||||||
free($2);
|
free($2);
|
||||||
|
/* suppress compiler warning */
|
||||||
|
(void)yynerrs;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user