From c8adf1039faffcf3fe4748bab7625ccf5d32ee70 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 15 Aug 2024 22:43:45 +0100 Subject: [PATCH] Provide proper declarations of functions Fixes the build with C99 / GCC-14. Closes: #1075632 --- gram.y | 8 ++++++++ parse.c | 1 + regions.c | 2 ++ 3 files changed, 11 insertions(+) diff --git a/gram.y b/gram.y index ac41412..6375e3f 100644 --- a/gram.y +++ b/gram.y @@ -118,6 +118,14 @@ extern int SetSound(); */ extern int yylineno; +/* + * yylex must be declared in C99. GCC 14 doesn't like it without. + * + * This thread is of some interest + * https://lists.gnu.org/r/bug-bison/2022-01/msg00002.html + */ +extern int yylex(); + %} %union diff --git a/parse.c b/parse.c index 050794a..0d9223a 100644 --- a/parse.c +++ b/parse.c @@ -370,6 +370,7 @@ void twmUnput (c) void TwmOutput(c) + int c; { putchar(c); } diff --git a/regions.c b/regions.c index 1067f1c..4a74cb2 100644 --- a/regions.c +++ b/regions.c @@ -99,6 +99,8 @@ splitRegionEntry (re, grav1, grav2, w, h) int roundEntryUp (v, multiple) + int v; + int multiple; { return ((v + multiple - 1) / multiple) * multiple; } -- 2.30.2