diff --git a/lib/grammar.y b/lib/grammar.y index f614fa7..b7d6989 100644 --- a/lib/grammar.y +++ b/lib/grammar.y @@ -40,8 +40,7 @@ #include "wincompat.h" /* These declarations are provided to suppress compiler warnings. */ -extern int libconfig_yylex(); -extern int libconfig_yyget_lineno(); +extern int libconfig_yyget_lineno(void *); #define YYMALLOC libconfig_malloc @@ -82,6 +81,11 @@ void libconfig_yyerror(void *scanner, struct parse_context *ctx, char *sval; } +%{ +/* These declarations are provided to suppress compiler warnings. */ +extern int libconfig_yylex(YYSTYPE *, void *); +%} + %token TOK_BOOLEAN TOK_INTEGER TOK_HEX %token TOK_INTEGER64 TOK_HEX64 %token TOK_FLOAT