Skip to content

build: Fix errors with latest wayland release#27

Draft
soreau wants to merge 1 commit intoartizirk:masterfrom
soreau:master
Draft

build: Fix errors with latest wayland release#27
soreau wants to merge 1 commit intoartizirk:masterfrom
soreau:master

Conversation

@soreau
Copy link
Copy Markdown

@soreau soreau commented May 1, 2025

Fixes build failure:

../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
      |                  ^~~~
../src/outputs.c:609:18: note: (near initialization for ‘output_listener.description’)
../src/outputs.c:31:13: note: ‘noop’ declared here
   31 | static void noop() {
      |             ^~~~
[29/31] Compiling C object src/wdisplays.p/main.c.o
../src/main.c: In function ‘main’:
../src/main.c:1086:3: warning: ‘G_APPLICATION_FLAGS_NONE’ is deprecated: Use 'G_APPLICATION_DEFAULT_FLAGS' instead [-Wdeprecated-declarations]
 1086 |   GtkApplication *app = gtk_application_new(WDISPLAYS_APP_ID, G_APPLICATION_FLAGS_NONE);
      |   ^~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:28,
                 from /usr/include/gtk-3.0/gdk/gdk.h:32,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from ../src/main.c:4:
/usr/include/glib-2.0/gio/gioenums.h:1556:3: note: declared here
 1556 |   G_APPLICATION_FLAGS_NONE GIO_DEPRECATED_ENUMERATOR_IN_2_74_FOR(G_APPLICATION_DEFAULT_FLAGS),
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
[30/31] Compiling C object src/wdisplays.p/render.c.o
ninja: build stopped: subcommand failed.

@soreau soreau mentioned this pull request May 1, 2025
@bodograumann
Copy link
Copy Markdown

I tried this and for me it causes a segmentation fault when trying to run.

@soreau
Copy link
Copy Markdown
Author

soreau commented May 1, 2025

I tried this and for me it causes a segmentation fault when trying to run.

Yes, you're right. I will mark this as a draft.

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.

2 participants