Jan Beich: 1 Fix -Wstrict-prototypes with Clang 15 2 files changed, 2 insertions(+), 2 deletions(-)
Copy & paste the following snippet into your terminal to import this patchset into git:
curl -s https://lists.sr.ht/~leon_plickat/lavalauncher/patches/38886/mbox | git am -3Learn more about email & git
Regressed by https://github.com/llvm/llvm-project/commit/11da1b53d8c See also https://discourse.llvm.org/t/rfc-enabling-wstrict-prototypes-by-default-in-c/60521 meson.build has warning_level=3 adding -Wpedantic and enabling -Wstrict-prototypes. src/output.c:43:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] static void noop () {} ^ void src/seat.c:48:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] static void noop () {} ^ void --- src/output.c | 2 +- src/seat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output.c b/src/output.c index cfd50ba..4110c1f 100644 --- a/src/output.c +++ b/src/output.c @@ -40,7 +40,7 @@ #include"bar.h" /* No-Op function. */ -static void noop () {} +static void noop (void) {} /* Loop through all bar patterns and create / destroy / update their instances on this output. */ static bool update_bar_instances_on_output (struct Lava_output *output) diff --git a/src/seat.c b/src/seat.c index 1ca332f..dbca9f8 100644 --- a/src/seat.c +++ b/src/seat.c @@ -45,7 +45,7 @@ #include"output.h" /* No-Op function. */ -static void noop () {} +static void noop (void) {} /************** * *
Jan Beich <jbeich@FreeBSD.org>Nevermind. The patch doesn't help. src/output.c:143:14: error: incompatible function pointer types initializing 'void (*)(void *, struct wl_output *, uint32_t, int32_t, int32_t, int32_t)' (aka 'void (*)(void *, struct wl_output *, unsigned int, int, int, int)') with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .mode = noop, ^~~~ src/output.c:171:22: error: incompatible function pointer types initializing 'void (*)(void *, struct zxdg_output_v1 *, int32_t, int32_t)' (aka 'void (*)(void *, struct zxdg_output_v1 *, int, int)') with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .logical_position = noop, ^~~~ src/output.c:172:22: error: incompatible function pointer types initializing 'void (*)(void *, struct zxdg_output_v1 *, const char *)' with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .description = noop, ^~~~ src/output.c:175:22: error: incompatible function pointer types initializing 'void (*)(void *, struct zxdg_output_v1 *)' with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .done = noop ^~~~ src/seat.c:111:17: error: incompatible function pointer types initializing 'void (*)(void *, struct wl_keyboard *, uint32_t, struct wl_surface *, struct wl_array *)' (aka 'void (*)(void *, struct wl_keyboard *, unsigned int, struct wl_surface *, struct wl_array *)') with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .enter = noop, ^~~~ src/seat.c:113:17: error: incompatible function pointer types initializing 'void (*)(void *, struct wl_keyboard *, uint32_t, uint32_t, uint32_t, uint32_t)' (aka 'void (*)(void *, struct wl_keyboard *, unsigned int, unsigned int, unsigned int, unsigned int)') with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .key = noop, ^~~~ src/seat.c:114:17: error: incompatible function pointer types initializing 'void (*)(void *, struct wl_keyboard *, uint32_t, struct wl_surface *)' (aka 'void (*)(void *, struct wl_keyboard *, unsigned int, struct wl_surface *)') with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .leave = noop, ^~~~ src/seat.c:116:17: error: incompatible function pointer types initializing 'void (*)(void *, struct wl_keyboard *, int32_t, int32_t)' (aka 'void (*)(void *, struct wl_keyboard *, int, int)') with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .repeat_info = noop ^~~~ src/seat.c:308:17: error: incompatible function pointer types initializing 'void (*)(void *, struct wl_touch *)' with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .frame = noop, ^~~~ src/seat.c:310:17: error: incompatible function pointer types initializing 'void (*)(void *, struct wl_touch *, int32_t, wl_fixed_t)' (aka 'void (*)(void *, struct wl_touch *, int, int)') with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .orientation = noop, ^~~~ src/seat.c:311:17: error: incompatible function pointer types initializing 'void (*)(void *, struct wl_touch *, int32_t, wl_fixed_t, wl_fixed_t)' (aka 'void (*)(void *, struct wl_touch *, int, int, int)') with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .shape = noop, ^~~~ src/seat.c:653:19: error: incompatible function pointer types initializing 'void (*)(void *, struct wl_pointer *, uint32_t)' (aka 'void (*)(void *, struct wl_pointer *, unsigned int)') with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .axis_source = noop, ^~~~ src/seat.c:654:19: error: incompatible function pointer types initializing 'void (*)(void *, struct wl_pointer *, uint32_t, uint32_t)' (aka 'void (*)(void *, struct wl_pointer *, unsigned int, unsigned int)') with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .axis_stop = noop, ^~~~ src/seat.c:722:18: error: incompatible function pointer types initializing 'void (*)(void *, struct wl_seat *, const char *)' with an expression of type 'void (void)' [-Werror,-Wincompatible-function-pointer-types] .name = noop ^~~~