From: Rudi Heitbaum Date: Thu, 5 Dec 2024 06:47:40 +0000 Subject: Fix declarations to allow build with gcc 15 Origin: upstream, https://github.com/hyperrealm/libconfig/commit/690342b9cbc8b39787a1501bd890d63ca63a003c Bug-Debian: https://bugs.debian.org/1097173 --- lib/grammar.y | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/grammar.y b/lib/grammar.y index 87dac00..0e9d0bb 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 *); static const char *err_array_elem_type = "mismatched element type in array"; static const char *err_duplicate_setting = "duplicate setting name"; @@ -80,6 +79,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