Fix -Wdeprecated-non-prototype warnings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Two K&R function definitions in vars.c and a function pointer with an empty argument list in traceroot.c cause warnings in clang 15, which may become errors by default in clang 16.
vars.c:94:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,
struct var *lookup_
^
vars.c:105:13: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,
struct var *lookup_by_obj(obj)
^
traceroot.c:257:36: error: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Changed in sbcl: | |
status: | Fix Released → Confirmed |
TBH we got 1 warning less without this patch. Now we get:
traceroot.c: In function 'deduce_thread': -pointer- types] scanner( compare_ pointer, c);
traceroot.c:258:37: warning: passing argument 1 of 'context_scanner' from incompatible pointer type [-Wincompatible
258 | context_
| ^~~~~~~~~~~~~~~
| |
| void (*)(void *)
traceroot.c:258:37: note: expected 'void (*)(void)' but argument is of type 'void (*)(void *)'
Can you provide a better fix please?