* Disable POSIX compliance when using reallocarray
cagebreak.c:197:11: warning: implicit declaration of function 'reallocarray' is invalid in C99 [-Wimplicit-function-declaration]
line = reallocarray(line, line_length, sizeof(char));
^
cagebreak.c:197:9: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
line = reallocarray(line, line_length, sizeof(char));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ipc_server.c:248:25: warning: implicit declaration of function 'reallocarray' is invalid in C99 [-Wimplicit-function-declaration]
client->read_buffer = reallocarray(client->read_buffer,
^
ipc_server.c:248:23: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
client->read_buffer = reallocarray(client->read_buffer,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Promote -Wimplicit-function-declaration to -Werror
To help find bugs caused by _POSIX_C_SOURCE. Already errors in C++ and C23.
* Fix -Wstrict-prototypes, default in Clang >= 15
In file included from output.c:30:
keybinding.h:136:21: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
keybinding_list_init();
^
void
output.c:335:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
empty_output_config() {
^
void
In file included from seat.c:29:
input_manager.h:19:40: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
input_manager_create_empty_input_config();
^
void
input_manager.c:92:40: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
input_manager_create_empty_input_config() {
^
void
keybinding.c:129:21: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
keybinding_list_init() {
^
void
See also
11da1b53d8https://discourse.llvm.org/t/rfc-enabling-wstrict-prototypes-by-default-in-c/60521