From: Michael Gernoth Date: Thu, 30 Jan 2025 10:39:44 +0000 (+0100) Subject: tk/tclx: explicitly declare types X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/micropolis/commitdiff_plain/f46cb0fc60e8c021d4d89f980d248453760a6137?ds=inline;hp=ba43e480ccc0580b680500212057fbafdd0b59ff tk/tclx: explicitly declare types fixes build failures on newer gcc versions --- diff --git a/src/tclx/src/tclxgdat.y b/src/tclx/src/tclxgdat.y index aea9f3d..2439a2f 100644 --- a/src/tclx/src/tclxgdat.y +++ b/src/tclx/src/tclxgdat.y @@ -46,11 +46,11 @@ #if 0 static time_t timeconv(int hh, int mm, int ss, int mer); static time_t daylcorr(time_t future, time_t now); - static lookup(char *id); + static int lookup(char *id); #else static time_t timeconv(); static time_t daylcorr(); - static lookup(); + static int lookup(); #endif #define AM 1 @@ -463,7 +463,7 @@ struct table milzone[] = { {0, 0, 0}}; static -lookup(id) char *id; +int lookup(id) char *id; { #define gotit (yylval=i->value, i->type) #define getid for(j=idvar, k=id; *j++ = *k++; ) diff --git a/src/tk/tkbitmap.c b/src/tk/tkbitmap.c index cc81cd0..c7693e8 100644 --- a/src/tk/tkbitmap.c +++ b/src/tk/tkbitmap.c @@ -434,7 +434,7 @@ Tk_GetBitmapFromData(interp, tkwin, source, width, height) Tk_Uid name = NULL; /* Initialization need only to prevent * compiler warning. */ int new; - static autoNumber = 0; + static int autoNumber = 0; char string[20]; if (!initialized) { diff --git a/src/tk/tkerror.c b/src/tk/tkerror.c index a58814c..b6fdb17 100644 --- a/src/tk/tkerror.c +++ b/src/tk/tkerror.c @@ -23,7 +23,7 @@ static char rcsid[] = "$Header: /user6/ouster/wish/RCS/tkError.c,v 1.10 92/04/12 #include "tkconfig.h" #include "tkint.h" -static initialized = 0; +static int initialized = 0; /* * Forward references to procedures declared later in this file: diff --git a/src/tk/tkpack.c b/src/tk/tkpack.c index f065bd5..a998017 100644 --- a/src/tk/tkpack.c +++ b/src/tk/tkpack.c @@ -95,7 +95,7 @@ static Tcl_HashTable packerHashTable; * Have statics in this module been initialized? */ -static initialized = 0; +static int initialized = 0; /* * Forward declarations for procedures defined later in this file: diff --git a/src/tk/tkpixmap.c b/src/tk/tkpixmap.c index 753bbe1..8d23dad 100644 --- a/src/tk/tkpixmap.c +++ b/src/tk/tkpixmap.c @@ -516,7 +516,7 @@ Tk_GetPixmapFromData(interp, tkwin, source, width, height) Tk_Uid name = NULL; /* Initialization need only to prevent * compiler warning. */ int new; - static autoNumber = 0; + static int autoNumber = 0; char string[20]; if (!initialized) { diff --git a/src/tk/tkwindow.c b/src/tk/tkwindow.c index 05029aa..eb6b7fe 100644 --- a/src/tk/tkwindow.c +++ b/src/tk/tkwindow.c @@ -55,7 +55,7 @@ TkDisplay *tkDisplayList = NULL; * Have statics in this module been initialized? */ -static initialized = 0; +static int initialized = 0; /* * Context information used to map from X window id's to