From 0ff9af4ae05b80bc09f4bf290ab7666930debf16 Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Mon, 4 May 2026 13:56:27 +0900 Subject: [PATCH] src/img/img-xpm.c: fix unused variable warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a warning in gcc16 below: ../src/img/img-xpm.c: In function ‘xpm_load_to_surface’: ../src/img/img-xpm.c:354:33: warning: variable ‘xcnt’ set but not used [-Wunused-but-set-variable=] 354 | for (int n = 0, xcnt = 0; n < wbytes; n += cpp, xcnt++) { | ^~~~ --- src/img/img-xpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/img/img-xpm.c b/src/img/img-xpm.c index 0d251b49..3bc7a9bb 100644 --- a/src/img/img-xpm.c +++ b/src/img/img-xpm.c @@ -351,7 +351,7 @@ xpm_load_to_surface(struct file_handle *handle) goto out; } - for (int n = 0, xcnt = 0; n < wbytes; n += cpp, xcnt++) { + for (int n = 0; n < wbytes; n += cpp) { g_strlcpy(pixel_str, &buffer[n], cpp + 1); struct xpm_color *color =