From 249602f57619d72faeb5b30578e1ad71c1fe9784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= Date: Fri, 4 Jul 2025 15:40:13 +0200 Subject: [PATCH 1/3] vimode: remove unused variable --- vimode/src/keypress.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/vimode/src/keypress.c b/vimode/src/keypress.c index 525c5ce36f..4a2f476ea8 100644 --- a/vimode/src/keypress.c +++ b/vimode/src/keypress.c @@ -159,7 +159,6 @@ void kpl_printf(GSList *kpl) gint kpl_get_int(GSList *kpl, GSList **new_kpl) { gint res = 0; - gint i = 0; GSList *pos = kpl; GSList *num_list = NULL; @@ -186,7 +185,6 @@ gint kpl_get_int(GSList *kpl, GSList **new_kpl) { res = res * 10 + kp_todigit(pos->data); pos = g_slist_next(pos); - i++; // some sanity check if (res > 1000000) break; From ec6fdaef85d09e6ca98bfe37e0a46902df43eeda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= Date: Fri, 4 Jul 2025 15:40:32 +0200 Subject: [PATCH 2/3] workbench: remove unused variable --- workbench/src/utils.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/workbench/src/utils.c b/workbench/src/utils.c index d9494761a5..59c07de2d2 100644 --- a/workbench/src/utils.c +++ b/workbench/src/utils.c @@ -138,7 +138,7 @@ gchar *get_combined_path(const gchar *base, const gchar *relative) **/ gchar *get_any_relative_path (const gchar *base, const gchar *target) { - guint index = 0, equal, equal_index = 0, base_parts = 0, target_parts = 0, length; + guint index = 0, equal, equal_index = 0, base_parts = 0, length; GPtrArray *relative; gchar *part; gchar *result = NULL; @@ -160,10 +160,6 @@ gchar *get_any_relative_path (const gchar *base, const gchar *target) index = 0;; while (splitv_target[index] != NULL) { - if (strlen(splitv_target[index]) > 0) - { - target_parts++; - } index++; } From 393f922665f23e80e5736f5605e05643875f862c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= Date: Fri, 4 Jul 2025 15:42:50 +0200 Subject: [PATCH 3/3] lsp: fix warning on macOS gint64 is "long long" on macOS and "long" on linux which leads to a warning in the format specifier. --- lsp/src/lsp-log.c | 2 +- lsp/src/lsp-progress.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lsp/src/lsp-log.c b/lsp/src/lsp-log.c index 96a84a23e5..a8fed4d711 100644 --- a/lsp/src/lsp-log.c +++ b/lsp/src/lsp-log.c @@ -110,7 +110,7 @@ void lsp_log(LspLogInfo log, LspLogType type, const gchar *method, GVariant *par if (req_time) { GTimeSpan delta = g_date_time_difference(time, req_time); - delta_str = g_strdup_printf(" (%ld ms)", delta / 1000); + delta_str = g_strdup_printf(" (%ld ms)", (long)(delta / 1000)); } else delta_str = g_strdup(""); diff --git a/lsp/src/lsp-progress.c b/lsp/src/lsp-progress.c index 242fe6927f..f14c9bae2b 100644 --- a/lsp/src/lsp-progress.c +++ b/lsp/src/lsp-progress.c @@ -187,7 +187,7 @@ void lsp_progress_process_notification(LspServer *srv, GVariant *params) ); if (have_percentage) { - g_snprintf(buf, 30, "%ld%%", percentage); + g_snprintf(buf, 30, "%ld%%", (long)percentage); message = buf; } }