From beb0d85224ef6f3a6526ce85f4e1b1ca436eb188 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Wed, 8 Apr 2026 20:52:35 +0000 Subject: [PATCH] plug-ins: Fix unused variable warning in file-xpm In file-xpm, use_x_api is only used when GDK_WINDOWING_X11 is defined. However, it was included as a general variable so it threw an unused variable warning when compiled on other systems. This patch moves the variable declaration inside the first #ifdef GDK_WINDOWING_X11 block of the parse_colors () function. --- plug-ins/common/file-xpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plug-ins/common/file-xpm.c b/plug-ins/common/file-xpm.c index 51f6e8d749..74b715fa3a 100644 --- a/plug-ins/common/file-xpm.c +++ b/plug-ins/common/file-xpm.c @@ -418,10 +418,10 @@ parse_colors (XpmImage *xpm_image) #ifdef GDK_WINDOWING_X11 Display *display; Colormap colormap; + gboolean use_x_api = FALSE; #endif gint i, j; guchar *cmap; - gboolean use_x_api = FALSE;; #ifdef GDK_WINDOWING_X11 use_x_api = (gdk_display_get_default () &&