blob: 226b39842b3c72a81dc15ec5cd2bf6f916f16d92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
https://src.fedoraproject.org/rpms/mscgen/blob/rawhide/f/mscgen-0.20-language.patch
Description: Use %parse-param to ensure that yyparse is generated
with the proper prototype.
# Fixes language.c:464:5: error: conflicting types for 'yyparse'
# https://code.google.com/p/mscgen/issues/detail?id=83
--- a/src/language.y
+++ b/src/language.y
@@ -48,7 +48,7 @@ int yylex_destroy(void);
* Error handling function. The TOK_XXX names are substituted for more
* understandable values that make more sense to the user.
*/
-void yyerror(const char *str)
+void yyerror(void *unused, const char *str)
{
static const char *tokNames[] = { "TOK_OCBRACKET", "TOK_CCBRACKET",
"TOK_OSBRACKET", "TOK_CSBRACKET",
@@ -224,6 +224,8 @@ Msc MscParse(FILE *in)
%}
+%parse-param {void *YYPARSE_PARAM}
+
%token TOK_STRING TOK_QSTRING TOK_EQUAL TOK_COMMA TOK_SEMICOLON TOK_OCBRACKET TOK_CCBRACKET
TOK_OSBRACKET TOK_CSBRACKET TOK_MSC
TOK_ATTR_LABEL TOK_ATTR_URL TOK_ATTR_ID TOK_ATTR_IDURL
|