From 6df7efaa3d60f45e7389cb97cf5c1e18f37cdeb0 Mon Sep 17 00:00:00 2001 From: Jehan Date: Sun, 1 Mar 2026 23:07:30 +0100 Subject: [PATCH] libgimpbase: variables must be defined at start of scope. Fixing: > libgimpbase/gimpenv.c:364:7: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] --- libgimpbase/gimpenv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libgimpbase/gimpenv.c b/libgimpbase/gimpenv.c index 3cc12b414a..8961ad68ba 100644 --- a/libgimpbase/gimpenv.c +++ b/libgimpbase/gimpenv.c @@ -346,6 +346,8 @@ gimp_directory (void) #else /* UNIX */ + const gchar *snap_path; + if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS)) { /* Linux flatpak version */ const gchar *host_xdg_config_home = g_getenv ("HOST_XDG_CONFIG_HOME"); @@ -361,7 +363,7 @@ gimp_directory (void) NULL); } - const gchar *snap_path = g_getenv ("SNAP"); + snap_path = g_getenv ("SNAP"); if (snap_path && g_file_test (snap_path, G_FILE_TEST_IS_DIR)) { const gchar *snap_real_home = g_getenv ("SNAP_REAL_HOME");