<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="Osso Notes">
<title></title></head>
<body>
<p>----- Original message -----
<br>> On 08/13/2012 08:30 PM, Balazs Scheidler wrote:
<br>> > ----- Original message -----
<br>> > > Greetings!
<br>> > >
<br>> > > I am having some difficulties compiling current master (at the time
<br>> > > of this writing) of syslog-ng 3.4. The first error is this:
<br>> > >
<br>> > > filter-expr-parser.c:30:5: error: conflicting types for
<br>> > > 'filter_expr_parse' In file included from filter-expr-parser.c:27:0:
<br>> > > filter-expr-grammar.h:404:5: note: previous declaration of
<br>> > > 'filter_expr_parse' was here
<br>> > > make[4]: *** [filter-expr-parser.lo] Error
<br>> > >
<br>> > > Now, at first I thought, since filter-expr-grammar.h is generated, it
<br>> > > might have something to do with my bison version or the likes. But
<br>> > > then I realized that the offending declaration in
<br>> > > filter-expr-parser.c:30:
<br>> > >
<br>> > > int filter_expr_parse(CfgLexer *lexer, FilterExprNode **node);
<br>> > >
<br>> > > directly contradicts its use int the same file below (line 74):
<br>> > >
<br>> > > .parse = (gint (*)(CfgLexer *, gpointer *, gpointer))
<br>> > > filter_expr_parse,
<br>> > >
<br>> > > filter-expr-parser.c is not generated, so I don't quite get how this
<br>> > > compiles at all for anyone? Am I missing something?
<br>> > >
<br>> > > The actual usage (line 74) matches the generated declaration, so I
<br>> > > can just comment out the offending one in line 30. But I suspect
<br>> > > this it not how it's supposed to work...
<br>> > >
<br>> > > Same thing happens for parser-expr-parser and rewrite-expr-parser...
<br>> >
<br>> > hm. earlier bison versions didn't declare the parse function. I can't
<br>> > remember warnings either, but I'll have to check the code.
<br>>
<br>> I am using bison 2.6.2, if this information is of any value...
<br>>
<br>> But still, doesn't the declaration contradict the call below anyways
<br>> (third parameter)?
<br>>
<br>
<br>these are only called through the pointer, iirc they really only have two params, but I don't know why I haven't seen warnings before.<br></p>
</body>
</html>