From da651ca7fcbd2052d10b1b18b4e8f62e16bba796 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Fri, 16 Apr 2021 15:36:58 +0800 Subject: [PATCH 1/2] update-icon-cache.c: Declare variables at top-of-block This way, things will continue to build on older compilers --- gtk/updateiconcache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c index 6703c8b9e8..787e718264 100644 --- a/gtk/updateiconcache.c +++ b/gtk/updateiconcache.c @@ -623,14 +623,13 @@ scan_directory (const gchar *base_path, list = g_list_sort (list, (GCompareFunc) strcmp); for (iterator = list; iterator; iterator = iterator->next) { - name = iterator->data; - gchar *path; gboolean retval; int flags = 0; Image *image; gchar *basename, *dot; + name = iterator->data; path = g_build_filename (dir_path, name, NULL); retval = g_file_test (path, G_FILE_TEST_IS_DIR); From b69790a7760647efcfbd7a4cd582a3824fa34ae4 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Fri, 16 Apr 2021 15:38:17 +0800 Subject: [PATCH 2/2] gtkimcontextsimple.c: Declare variables at top-of-block This way, things will continue to build on older compilers --- gtk/gtkimcontextsimple.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c index 89221ce80e..38806d05c3 100644 --- a/gtk/gtkimcontextsimple.c +++ b/gtk/gtkimcontextsimple.c @@ -553,8 +553,10 @@ no_sequence_matches (GtkIMContextSimple *context_simple, if (i == n_compose - 1) { + int j; + /* dead keys are never *really* dead */ - for (int j = 0; j < i; j++) + for (j = 0; j < i; j++) { ch = dead_key_to_unicode (priv->compose_buffer[j], &need_space); if (ch)