From 45c3490e0ab7b6a2dd7177b872780ce3b036dfbd Mon Sep 17 00:00:00 2001 From: Alan Griffiths Date: Fri, 24 Nov 2023 17:11:51 +0000 Subject: [PATCH] Fix gcc builds --- examples/client/mir_shell_demo.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/client/mir_shell_demo.cpp b/examples/client/mir_shell_demo.cpp index 64e80eb1fb0..9bb5f22a5bc 100644 --- a/examples/client/mir_shell_demo.cpp +++ b/examples/client/mir_shell_demo.cpp @@ -264,6 +264,9 @@ void globals::init() xdg_wm_base_add_listener(globals::wm_base, &shell_listener, NULL); } +// If building against newer Wayland protocol definitions we may miss trailing fields +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" wl_callback_listener const window::frame_listener = { .done = [](void* ctx, auto... args) { static_cast(ctx)->handle_frame_callback(args...); }, @@ -293,6 +296,7 @@ wl_keyboard_listener const window::keyboard_listener = [](void* self, auto... args) { static_cast(self)->handle_keyboard_modifiers(args...); }, [](void* self, auto... args) { static_cast(self)->handle_keyboard_repeat_info(args...); }, }; +#pragma GCC diagnostic pop void window::update_free_buffers(wl_buffer* buffer) {