From b5450c3918d8a0c2c9ab6384de32933e7b5a4534 Mon Sep 17 00:00:00 2001 From: Nicholas Sudsgaard Date: Tue, 4 Mar 2025 14:46:08 +0900 Subject: [PATCH] modules/i3: Add unused attribute to focused This variable is only used in assert() which expands to nothing in release builds. Adding the unused attribute prevents the compiler from throwing an error (-Wunused-but-set-variable) when building. --- modules/i3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/i3.c b/modules/i3.c index 47f6d99..cbdafaf 100644 --- a/modules/i3.c +++ b/modules/i3.c @@ -594,7 +594,7 @@ handle_window_event(int sock, int type, const struct json_object *json, void *_m mtx_lock(&mod->lock); struct workspace *ws = NULL; - size_t focused = 0; + __attribute__((unused)) size_t focused = 0; tll_foreach(m->workspaces, it) { if (it->item.focused) {