[gnome-builder/wip/gtk4-port] plugins: fix a number of clang discovered warnings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins: fix a number of clang discovered warnings
- Date: Wed, 15 Jun 2022 22:11:59 +0000 (UTC)
commit 64be1683cb890c08ef8a1faa9ec233fd4fa4346d
Author: Christian Hergert <christian hergert me>
Date: Wed Jun 15 15:06:30 2022 -0700
plugins: fix a number of clang discovered warnings
src/libide/code/ide-symbol.c | 2 --
src/libide/gui/ide-gui-global.c | 2 +-
src/libide/sourceview/ide-source-view.c | 1 -
src/libide/vcs/ide-vcs-cloner.c | 1 -
src/plugins/npm/gbp-npm-run-command-provider.c | 2 +-
src/plugins/phpize/gbp-phpize-pipeline-addin.c | 1 -
src/plugins/shellcmd/gbp-shellcmd-command-dialog.c | 1 -
src/plugins/shellcmd/gbp-shellcmd-command-model.c | 1 -
src/plugins/shellcmd/gbp-shellcmd-preferences-addin.c | 1 -
src/plugins/vcsui/gbp-vcsui-switcher-popover.c | 2 --
src/plugins/waf/gbp-waf-build-target-provider.c | 3 ---
src/plugins/waf/gbp-waf-run-command-provider.c | 2 --
12 files changed, 2 insertions(+), 17 deletions(-)
---
diff --git a/src/libide/code/ide-symbol.c b/src/libide/code/ide-symbol.c
index 44c71eaf8..7991226f6 100644
--- a/src/libide/code/ide-symbol.c
+++ b/src/libide/code/ide-symbol.c
@@ -462,10 +462,8 @@ ide_symbol_new_from_variant (GVariant *variant)
g_autoptr(GVariant) unboxed = NULL;
g_autoptr(GVariant) vdecl = NULL;
g_autoptr(GVariant) vdef = NULL;
- g_autoptr(GVariant) vcanon = NULL;
g_autoptr(IdeLocation) decl = NULL;
g_autoptr(IdeLocation) def = NULL;
- g_autoptr(IdeLocation) canon = NULL;
const gchar *name;
IdeSymbolKind kind;
IdeSymbolFlags flags;
diff --git a/src/libide/gui/ide-gui-global.c b/src/libide/gui/ide-gui-global.c
index 76298c376..49c56ebc4 100644
--- a/src/libide/gui/ide-gui-global.c
+++ b/src/libide/gui/ide-gui-global.c
@@ -144,7 +144,7 @@ ide_widget_set_context_handler (gpointer widget,
ide_widget_notify_root_cb (widget, NULL, NULL);
}
-static gboolean dummy_cb (gpointer) { return G_SOURCE_REMOVE; }
+static gboolean dummy_cb (gpointer data) { return G_SOURCE_REMOVE; }
/**
* ide_widget_get_context:
diff --git a/src/libide/sourceview/ide-source-view.c b/src/libide/sourceview/ide-source-view.c
index fb67cd68c..8131353e5 100644
--- a/src/libide/sourceview/ide-source-view.c
+++ b/src/libide/sourceview/ide-source-view.c
@@ -180,7 +180,6 @@ ide_source_view_click_pressed_cb (IdeSourceView *self,
GtkGestureClick *click)
{
GdkEventSequence *sequence;
- g_auto(GStrv) corrections = NULL;
GtkTextBuffer *buffer;
GdkEvent *event;
GtkTextIter iter;
diff --git a/src/libide/vcs/ide-vcs-cloner.c b/src/libide/vcs/ide-vcs-cloner.c
index 5f45b2583..80e2f2060 100644
--- a/src/libide/vcs/ide-vcs-cloner.c
+++ b/src/libide/vcs/ide-vcs-cloner.c
@@ -162,7 +162,6 @@ ide_vcs_cloner_clone_simple_clone_cb (GObject *object,
gpointer user_data)
{
IdeVcsCloner *cloner = (IdeVcsCloner *)object;
- g_autoptr(GError) error = NULL;
CloneSimple *state = user_data;
g_assert (IDE_IS_VCS_CLONER (cloner));
diff --git a/src/plugins/npm/gbp-npm-run-command-provider.c b/src/plugins/npm/gbp-npm-run-command-provider.c
index d5cac4291..b6c3ce63b 100644
--- a/src/plugins/npm/gbp-npm-run-command-provider.c
+++ b/src/plugins/npm/gbp-npm-run-command-provider.c
@@ -160,7 +160,7 @@ gbp_npm_run_command_provider_list_commands_worker (IdeTask *task,
g_autofree char *display_name = NULL;
int priority;
- if (is_ignored_script (script, (const char * const *)all_scripts->data))
+ if (is_ignored_script (script, (const char * const *)(gpointer)all_scripts->data))
continue;
id = g_strconcat ("npm:", script, NULL);
diff --git a/src/plugins/phpize/gbp-phpize-pipeline-addin.c b/src/plugins/phpize/gbp-phpize-pipeline-addin.c
index d982a05b7..a7d5b9f83 100644
--- a/src/plugins/phpize/gbp-phpize-pipeline-addin.c
+++ b/src/plugins/phpize/gbp-phpize-pipeline-addin.c
@@ -62,7 +62,6 @@ gbp_phpize_pipeline_addin_load (IdePipelineAddin *addin,
g_autoptr(IdePipelineStage) config_stage = NULL;
g_autoptr(IdePipelineStage) build_stage = NULL;
g_autoptr(IdePipelineStage) install_stage = NULL;
- g_autoptr(GError) error = NULL;
g_autofree char *configure_path = NULL;
IdeBuildSystem *build_system;
const char *builddir;
diff --git a/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c
b/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c
index d682b0e4a..c06935261 100644
--- a/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c
+++ b/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c
@@ -385,7 +385,6 @@ command_save_action (GtkWidget *widget,
GVariant *param)
{
GbpShellcmdCommandDialog *self = (GbpShellcmdCommandDialog *)widget;
- g_autoptr(GStrvBuilder) builder = NULL;
g_auto(GStrv) argv = NULL;
g_auto(GStrv) env = NULL;
const char *argvstr;
diff --git a/src/plugins/shellcmd/gbp-shellcmd-command-model.c
b/src/plugins/shellcmd/gbp-shellcmd-command-model.c
index 469ae5e8d..91797163a 100644
--- a/src/plugins/shellcmd/gbp-shellcmd-command-model.c
+++ b/src/plugins/shellcmd/gbp-shellcmd-command-model.c
@@ -165,7 +165,6 @@ gbp_shellcmd_command_model_constructed (GObject *object)
{
GbpShellcmdCommandModel *self = (GbpShellcmdCommandModel *)object;
g_autofree char *signal_name = NULL;
- g_auto(GStrv) commands = NULL;
G_OBJECT_CLASS (gbp_shellcmd_command_model_parent_class)->constructed (object);
diff --git a/src/plugins/shellcmd/gbp-shellcmd-preferences-addin.c
b/src/plugins/shellcmd/gbp-shellcmd-preferences-addin.c
index 64f8ea1e7..28d8d8f01 100644
--- a/src/plugins/shellcmd/gbp-shellcmd-preferences-addin.c
+++ b/src/plugins/shellcmd/gbp-shellcmd-preferences-addin.c
@@ -98,7 +98,6 @@ on_row_activated_cb (GtkListBox *list_box,
{
IdePreferencesMode mode = ide_preferences_window_get_mode (window);
IdeContext *context = ide_preferences_window_get_context (window);
- g_autofree char *settings_path = NULL;
if (mode == IDE_PREFERENCES_MODE_PROJECT)
new_command = gbp_shellcmd_run_command_create (context);
diff --git a/src/plugins/vcsui/gbp-vcsui-switcher-popover.c b/src/plugins/vcsui/gbp-vcsui-switcher-popover.c
index 2e798f1fe..ea7048a1c 100644
--- a/src/plugins/vcsui/gbp-vcsui-switcher-popover.c
+++ b/src/plugins/vcsui/gbp-vcsui-switcher-popover.c
@@ -53,7 +53,6 @@ gbp_vcsui_switcher_popover_list_branches_cb (GObject *object,
{
IdeVcs *vcs = (IdeVcs *)object;
g_autoptr(GbpVcsuiSwitcherPopover) self = user_data;
- g_autoptr(GListStore) store = NULL;
g_autoptr(GPtrArray) ar = NULL;
g_autoptr(GError) error = NULL;
@@ -85,7 +84,6 @@ gbp_vcsui_switcher_popover_list_tags_cb (GObject *object,
{
IdeVcs *vcs = (IdeVcs *)object;
g_autoptr(GbpVcsuiSwitcherPopover) self = user_data;
- g_autoptr(GListStore) store = NULL;
g_autoptr(GPtrArray) ar = NULL;
g_autoptr(GError) error = NULL;
diff --git a/src/plugins/waf/gbp-waf-build-target-provider.c b/src/plugins/waf/gbp-waf-build-target-provider.c
index 374dff5f1..b5c826106 100644
--- a/src/plugins/waf/gbp-waf-build-target-provider.c
+++ b/src/plugins/waf/gbp-waf-build-target-provider.c
@@ -73,8 +73,6 @@ gbp_waf_build_target_provider_list_cb (GObject *object,
while ((line = ide_line_reader_next (&reader, &line_len)))
{
- g_autoptr(IdeBuildTarget) build_target = NULL;
-
line[line_len] = 0;
g_strstrip (line);
@@ -100,7 +98,6 @@ gbp_waf_build_target_provider_get_targets_async (IdeBuildTargetProvider *provide
GbpWafBuildTargetProvider *self = (GbpWafBuildTargetProvider *)provider;
g_autoptr(IdeSubprocessLauncher) launcher = NULL;
g_autoptr(IdeSubprocess) subprocess = NULL;
- g_autoptr(IdeBuildTarget) build_target = NULL;
g_autoptr(IdeTask) task = NULL;
g_autoptr(GError) error = NULL;
g_autofree char *waf = NULL;
diff --git a/src/plugins/waf/gbp-waf-run-command-provider.c b/src/plugins/waf/gbp-waf-run-command-provider.c
index ed56fb287..a9d6c72a4 100644
--- a/src/plugins/waf/gbp-waf-run-command-provider.c
+++ b/src/plugins/waf/gbp-waf-run-command-provider.c
@@ -118,8 +118,6 @@ gbp_waf_run_command_provider_list_commands_async (IdeRunCommandProvider *provide
GbpWafRunCommandProvider *self = (GbpWafRunCommandProvider *)provider;
g_autoptr(IdeSubprocessLauncher) launcher = NULL;
g_autoptr(IdeSubprocess) subprocess = NULL;
- g_autoptr(IdeRunCommand) run_command = NULL;
- g_autoptr(GListStore) store = NULL;
g_autoptr(IdeTask) task = NULL;
g_autoptr(GError) error = NULL;
g_autofree char *waf = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]