commit 4206e56

uint  ·  2026-08-04 01:12:42 +0000 UTC
parent bae27ca
Wayland: void unused variables for no warnings
1 files changed,  +94, -15
+94, -15
  1@@ -68,7 +68,12 @@ static struct wl_keyboard_listener keyboard_listener = {
  2 	keyboard_modifiers, keyboard_repeat_info
  3 };
  4 
  5-static void registry_global_remove(void *data, struct wl_registry *wl_registry, uint32_t name) { }
  6+static void registry_global_remove(void *data, struct wl_registry *wl_registry, uint32_t name)
  7+{
  8+	(void)data;
  9+	(void)wl_registry;
 10+	(void)name;
 11+}
 12 
 13 static void xdg_surface_configure(void* data, struct xdg_surface* xdg_surface, uint32_t serial)
 14 {
 15@@ -109,10 +114,21 @@ static void xdg_toplevel_close(void* data, struct xdg_toplevel* xdg_toplevel)
 16 }
 17 
 18 static void xdg_toplevel_configure_bounds(void* data, struct xdg_toplevel* xdg_toplevel,
 19-                                          int32_t width, int32_t height) { }
 20+                                          int32_t width, int32_t height)
 21+{
 22+	(void)data;
 23+	(void)xdg_toplevel;
 24+	(void)width;
 25+	(void)height;
 26+}
 27 
 28 static void xdg_toplevel_wm_capabilities(void* data, struct xdg_toplevel* xdg_toplevel,
 29-                                         struct wl_array* capabilities) { }
 30+                                         struct wl_array* capabilities)
 31+{
 32+	(void)data;
 33+	(void)xdg_toplevel;
 34+	(void)capabilities;
 35+}
 36 
 37 static void wm_base_ping(void* data, struct xdg_wm_base* wm_base, uint32_t serial)
 38 {
 39@@ -167,7 +183,12 @@ static void seat_capabilities(void* data, struct wl_seat* seat, uint32_t capabil
 40 	}
 41 }
 42 
 43-static void seat_name(void* data, struct wl_seat* seat, const char* name) { }
 44+static void seat_name(void* data, struct wl_seat* seat, const char* name)
 45+{
 46+	(void)data;
 47+	(void)seat;
 48+	(void)name;
 49+}
 50 
 51 static void pointer_enter(void* data, struct wl_pointer* pointer, uint32_t serial,
 52                           struct wl_surface* surface, wl_fixed_t sx, wl_fixed_t sy)
 53@@ -187,7 +208,13 @@ static void pointer_enter(void* data, struct wl_pointer* pointer, uint32_t seria
 54 }
 55 
 56 static void pointer_leave(void* data, struct wl_pointer* pointer, uint32_t serial,
 57-                          struct wl_surface* surface) { }
 58+                          struct wl_surface* surface)
 59+{
 60+	(void)data;
 61+	(void)pointer;
 62+	(void)serial;
 63+	(void)surface;
 64+}
 65 
 66 static void pointer_motion(void* data, struct wl_pointer* pointer, uint32_t time,
 67                            wl_fixed_t sx, wl_fixed_t sy)
 68@@ -242,21 +269,52 @@ static void pointer_axis(void* data, struct wl_pointer* pointer, uint32_t time,
 69 	mw->backend.pending.mouse_pressed = 1;
 70 }
 71 
 72-static void pointer_frame(void* data, struct wl_pointer* pointer) { }
 73+static void pointer_frame(void* data, struct wl_pointer* pointer)
 74+{
 75+	(void)data;
 76+	(void)pointer;
 77+}
 78 
 79-static void pointer_axis_source(void* data, struct wl_pointer* pointer, uint32_t axis_source) { }
 80+static void pointer_axis_source(void* data, struct wl_pointer* pointer, uint32_t axis_source)
 81+{
 82+	(void)data;
 83+	(void)pointer;
 84+	(void)axis_source;
 85+}
 86 
 87 static void pointer_axis_stop(void* data, struct wl_pointer* pointer, uint32_t time, uint32_t axis) {
 88+	(void)data;
 89+	(void)pointer;
 90+	(void)time;
 91+	(void)axis;
 92 }
 93 
 94 static void pointer_axis_discrete(void* data, struct wl_pointer* pointer, uint32_t axis,
 95-                                  int32_t discrete) { }
 96+                                  int32_t discrete)
 97+{
 98+	(void)data;
 99+	(void)pointer;
100+	(void)axis;
101+	(void)discrete;
102+}
103 
104 static void pointer_axis_value120(void* data, struct wl_pointer* pointer, uint32_t axis,
105-                                  int32_t value120) { }
106+                                  int32_t value120)
107+{
108+	(void)data;
109+	(void)pointer;
110+	(void)axis;
111+	(void)value120;
112+}
113 
114 static void pointer_axis_relative_direction(void* data, struct wl_pointer* pointer,
115-                                            uint32_t axis, uint32_t direction) { }
116+                                            uint32_t axis, uint32_t direction)
117+{
118+	(void)data;
119+	(void)pointer;
120+	(void)axis;
121+	(void)direction;
122+}
123 
124 static void keyboard_keymap(void* data, struct wl_keyboard* keyboard, uint32_t format,
125                             int32_t fd, uint32_t size)
126@@ -299,10 +357,23 @@ static void keyboard_keymap(void* data, struct wl_keyboard* keyboard, uint32_t f
127 }
128 
129 static void keyboard_enter(void* data, struct wl_keyboard* keyboard, uint32_t serial,
130-                           struct wl_surface* surface, struct wl_array* keys) { }
131+                           struct wl_surface* surface, struct wl_array* keys)
132+{
133+	(void)data;
134+	(void)keyboard;
135+	(void)serial;
136+	(void)surface;
137+	(void)keys;
138+}
139 
140 static void keyboard_leave(void* data, struct wl_keyboard* keyboard, uint32_t serial,
141-                           struct wl_surface* surface) { }
142+                           struct wl_surface* surface)
143+{
144+	(void)data;
145+	(void)keyboard;
146+	(void)serial;
147+	(void)surface;
148+}
149 
150 static void keyboard_key(void* data, struct wl_keyboard* keyboard, uint32_t serial,
151                          uint32_t time, uint32_t key, uint32_t state)
152@@ -366,7 +437,13 @@ static void keyboard_modifiers(void* data, struct wl_keyboard* keyboard, uint32_
153 }
154 
155 static void keyboard_repeat_info(void* data, struct wl_keyboard* keyboard,
156-                                 int32_t rate, int32_t delay) { }
157+                                 int32_t rate, int32_t delay)
158+{
159+	(void)data;
160+	(void)keyboard;
161+	(void)rate;
162+	(void)delay;
163+}
164 
165 
166 static int8_t cursor_init(Maus* mw)
167@@ -634,12 +711,14 @@ void maus_clear(Maus* mw, MausColor col)
168 
169 void maus_clipboard_set_text(Maus* mw, const char* text)
170 {
171-
172+	(void)mw;
173+	(void)text;
174 }
175 
176 char* maus_clipboard_get_text(Maus* mw)
177 {
178-
179+	(void)mw;
180+	return NULL;
181 }
182 
183 void maus_close(Maus* mw)