File 0001-Fix-function-declarations.patch of Package rootbar

# HG changeset patch
# User Mia Herkt <mia@0x0.st>
# Date 1763381456 -3600
#      Mon Nov 17 13:10:56 2025 +0100
# Node ID 51ad07f7d7b5edb2cd9acb0c2fc9202a51538e28
# Parent  36333af9fd8d7062158b302eb84b6296f538e306
Fix function declarations

diff --git a/inc/map.h b/inc/map.h
--- a/inc/map.h
+++ b/inc/map.h
@@ -27,7 +27,7 @@
 
 struct map* map_init_void();
 
-void map_free();
+void map_free(struct map* map);
 
 bool map_put(struct map* map, const char* key, char* value);
 
diff --git a/src/bar.c b/src/bar.c
--- a/src/bar.c
+++ b/src/bar.c
@@ -63,7 +63,7 @@
 	int32_t top_margin, right_margin, left_margin, bottom_margin;
 };
 
-static void nop() {}
+#define nop(A) ({void __fn__ A {} __fn__;})
 
 static void add_interface(void* data, struct wl_registry* registry, uint32_t name, const char* interface, uint32_t version) {
 	struct bar* this = data;
@@ -435,7 +435,7 @@
 	struct wl_registry* registry = wl_display_get_registry(wl);
 	struct wl_registry_listener reg_listener = {
 		.global = add_interface,
-		.global_remove = nop
+		.global_remove = nop((void *, struct wl_registry *, uint32_t))
 	};
 	wl_registry_add_listener(registry, &reg_listener, this);
 	wl_display_roundtrip(wl);
@@ -444,9 +444,9 @@
 	wl_list_for_each(node, &this->outputs, link) {
 		struct zxdg_output_v1* xdg_output = zxdg_output_manager_v1_get_xdg_output(this->output_manager, node->output);
 		struct zxdg_output_v1_listener* xdg_listener = malloc(sizeof(struct zxdg_output_v1_listener));
-		xdg_listener->description = nop;
-		xdg_listener->done = nop;
-		xdg_listener->logical_position = nop;
+		xdg_listener->description = nop((void *, struct zxdg_output_v1 *, const char *));
+		xdg_listener->done = nop((void *, struct zxdg_output_v1 *));
+		xdg_listener->logical_position = nop((void *, struct zxdg_output_v1 *, int32_t,  int32_t));
 		xdg_listener->logical_size = get_res;
 		xdg_listener->name = get_name;
 		zxdg_output_v1_add_listener(xdg_output, xdg_listener, node);
@@ -490,7 +490,7 @@
 
 	struct zwlr_layer_surface_v1_listener* surface_listener = malloc(sizeof(struct zwlr_layer_surface_v1_listener));
 	surface_listener->configure = config_surface;
-	surface_listener->closed = nop;
+	surface_listener->closed = nop((void *, struct zwlr_layer_surface_v1 *));
 	zwlr_layer_surface_v1_add_listener(this->surface, surface_listener, NULL);
 	wl_surface_commit(wl_surface);
 	wl_display_roundtrip(wl);
openSUSE Build Service is sponsored by