From: Ian Jackson Date: Thu, 15 Aug 2024 21:43:45 +0000 (+0100) Subject: Provide proper declarations of functions X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=c8adf1039faffcf3fe4748bab7625ccf5d32ee70;p=vtwm.git Provide proper declarations of functions Fixes the build with C99 / GCC-14. Closes: #1075632 --- 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; }