motif: makestrs' function tables carry their prototypes
makestrs.c declared two dispatch tables as 'void (*table[])()' -- unspecified parameters -- and GCC 14 rejects the initialisers and the two-argument call (-Wincompatible-pointer-types is an error there; build/logs/ userland-2026-11-13u.log:1267-1313). The six header writers all take (FILE*, File*) and the five source writers take (int), so the arrays say so. Checked with gcc -fsyntax-only -std=gnu17 against the sysroot headers.
This commit is contained in:
1 parent
40f0cdaaee
commit
102f52239e
1 file changed
+2
-2
@@ -238,7 +238,7 @@ WriteHeader (char* tagline, File* phile, int abi)
|
||||
char* tmp;
|
||||
Table* t;
|
||||
TableEnt* te;
|
||||
static void (*headerproc[])() = { DefaultWriteHeader, ArrayperWriteHeader,
|
||||
static void (*headerproc[])(FILE *, File *) = { DefaultWriteHeader, ArrayperWriteHeader,
|
||||
IntelABIWriteHeader, IntelABIWriteHeader,
|
||||
SPARCABIWriteHeader, FunctionWriteHeader };
|
||||
|
||||
@@ -404,7 +404,7 @@ DefaultWriteSource (int abi)
|
||||
static void
|
||||
WriteSource(char* tagline, int abi)
|
||||
{
|
||||
static void (*sourceproc[])() = {
|
||||
static void (*sourceproc[])(int) = {
|
||||
DefaultWriteSource, ArrayperWriteSource,
|
||||
IntelABIWriteSource, IntelABIBCWriteSource,
|
||||
DefaultWriteSource, FunctionWriteSource };
|
||||
|
||||
Reference in new issue
Block a user