Skip to content

Fix incompatible pointer type using explicit noop functions#28

Open
MatthiasKunnen wants to merge 1 commit intoartizirk:masterfrom
MatthiasKunnen:explicit-noop
Open

Fix incompatible pointer type using explicit noop functions#28
MatthiasKunnen wants to merge 1 commit intoartizirk:masterfrom
MatthiasKunnen:explicit-noop

Conversation

@MatthiasKunnen
Copy link
Copy Markdown

On master, building results in the following errors.

../src/outputs.c:529:15: error: initialization of ‘void (*)(void *, struct zwlr_output_manager_v1 *)’ from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
  529 |   .finished = noop,
      |               ^~~~
../src/outputs.c:529:15: note: (near initialization for ‘output_manager_listener.finished’)
../src/outputs.c:31:13: note: ‘noop’ declared here
   31 | static void noop() {
      |             ^~~~
../src/outputs.c:556:20: error: initialization of ‘void (*)(void *, struct wl_registry *, uint32_t)’ {aka ‘void (*)(void *, struct wl_registry *, unsigned int)’} from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
  556 |   .global_remove = noop,
      |                    ^~~~
../src/outputs.c:556:20: note: (near initialization for ‘registry_listener.global_remove’)
../src/outputs.c:31:13: note: ‘noop’ declared here
   31 | static void noop() {
      |             ^~~~
../src/outputs.c:606:19: error: initialization of ‘void (*)(void *, struct zxdg_output_v1 *, int32_t,  int32_t)’ {aka ‘void (*)(void *, struct zxdg_output_v1 *, int,  int)’} from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
  606 |   .logical_size = noop,
      |                   ^~~~
../src/outputs.c:606:19: note: (near initialization for ‘output_listener.logical_size’)
../src/outputs.c:31:13: note: ‘noop’ declared here
   31 | static void noop() {
      |             ^~~~
../src/outputs.c:607:11: error: initialization of ‘void (*)(void *, struct zxdg_output_v1 *)’ from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
  607 |   .done = noop,
      |           ^~~~
../src/outputs.c:607:11: note: (near initialization for ‘output_listener.done’)
../src/outputs.c:31:13: note: ‘noop’ declared here
   31 | static void noop() {
      |             ^~~~
../src/outputs.c:609:18: error: initialization of ‘void (*)(void *, struct zxdg_output_v1 *, const char *)’ from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
  609 |   .description = noop
      |                  ^~~~

This PR replaces the generic noop function with explicit ones. Argument names are taking from the respective wayland protocols.

Closes #25.
Closes #27.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant