[gnome-builder] build: fix a number of clang warnings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] build: fix a number of clang warnings
- Date: Tue, 12 Jun 2018 08:29:35 +0000 (UTC)
commit f07e0933bad061dc6e8eaf7959bf339bfd7b927c
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 12 01:28:28 2018 -0700
build: fix a number of clang warnings
.../ide-buildconfig-configuration-provider.c | 1 -
src/libide/buildsystem/ide-build-pipeline.c | 1 -
src/libide/buildsystem/ide-build-stage.c | 1 -
src/libide/completion/ide-completion-provider.c | 2 --
src/libide/devices/ide-device-info.c | 1 -
src/libide/layout/ide-layout-stack.c | 6 +++---
src/libide/plugins/ide-extension-util.c | 2 +-
src/libide/runner/ide-run-manager.c | 1 -
src/libide/search/ide-search-engine.c | 1 -
src/libide/snippets/ide-snippet-storage.c | 2 +-
src/libide/subprocess/ide-breakout-subprocess.c | 12 ------------
src/libide/util/ide-glib.c | 1 -
src/plugins/autotools/ide-autotools-makecache-stage.c | 1 -
src/plugins/clang/gnome-builder-clang.c | 9 ---------
src/plugins/clang/ide-clang-proposals.c | 7 -------
src/plugins/clang/ide-clang-symbol-node.c | 1 -
src/plugins/cmake/gbp-cmake-build-stage-cross-file.c | 2 --
src/plugins/cmake/gbp-cmake-build-system.c | 1 -
src/plugins/ctags/ide-ctags-service.c | 1 -
.../flatpak/gbp-flatpak-build-system-discovery.c | 1 -
src/plugins/flatpak/gbp-flatpak-clone-widget.c | 2 --
.../flatpak/gbp-flatpak-configuration-provider.c | 1 -
src/plugins/flatpak/gbp-flatpak-pipeline-addin.c | 1 -
src/plugins/flatpak/gbp-flatpak-runner.c | 8 ++++----
src/plugins/flatpak/gbp-flatpak-runtime-provider.c | 1 -
src/plugins/flatpak/gbp-flatpak-runtime.c | 1 -
src/plugins/gcc/gbp-gcc-toolchain-provider.c | 6 +++---
src/plugins/gdb/gbp-gdb-debugger.c | 2 --
src/plugins/git/ide-git-vcs.c | 1 -
src/plugins/meson/gbp-meson-build-system.c | 2 --
src/plugins/meson/gbp-meson-test-provider.c | 19 +++++++++----------
.../gbp-meson-toolchain-edition-preferences-row.c | 1 -
src/plugins/meson/gbp-meson-toolchain-provider.c | 1 -
src/plugins/sysprof/gbp-sysprof-workbench-addin.c | 1 -
src/plugins/sysroot/gbp-sysroot-runtime.c | 1 -
src/plugins/todo/gbp-todo-panel.c | 1 -
src/plugins/words/gbp-word-proposals.c | 1 -
src/tests/test-ide-task.c | 4 ----
src/tests/test-snippet-parser.c | 4 ----
39 files changed, 21 insertions(+), 91 deletions(-)
---
diff --git a/src/libide/buildconfig/ide-buildconfig-configuration-provider.c
b/src/libide/buildconfig/ide-buildconfig-configuration-provider.c
index cf485ae3f..d03c290e3 100644
--- a/src/libide/buildconfig/ide-buildconfig-configuration-provider.c
+++ b/src/libide/buildconfig/ide-buildconfig-configuration-provider.c
@@ -191,7 +191,6 @@ ide_buildconfig_configuration_provider_create (IdeBuildconfigConfigurationProvid
{
g_autoptr(IdeConfiguration) config = NULL;
g_autofree gchar *env_group = NULL;
- g_autofree gchar *locality = NULL;
IdeContext *context;
g_assert (IDE_IS_BUILDCONFIG_CONFIGURATION_PROVIDER (self));
diff --git a/src/libide/buildsystem/ide-build-pipeline.c b/src/libide/buildsystem/ide-build-pipeline.c
index 2bd9d7ed2..175bc5c66 100644
--- a/src/libide/buildsystem/ide-build-pipeline.c
+++ b/src/libide/buildsystem/ide-build-pipeline.c
@@ -3329,7 +3329,6 @@ ide_build_pipeline_clean_finish (IdeBuildPipeline *self,
static gboolean
can_remove_builddir (IdeBuildPipeline *self)
{
- g_autofree gchar *name = NULL;
g_autofree gchar *_build = NULL;
g_autoptr(GFile) builddir = NULL;
g_autoptr(GFile) cache = NULL;
diff --git a/src/libide/buildsystem/ide-build-stage.c b/src/libide/buildsystem/ide-build-stage.c
index 41b179f1c..2599d1882 100644
--- a/src/libide/buildsystem/ide-build-stage.c
+++ b/src/libide/buildsystem/ide-build-stage.c
@@ -516,7 +516,6 @@ ide_build_stage_execute_async (IdeBuildStage *self,
gpointer user_data)
{
IdeBuildStagePrivate *priv = ide_build_stage_get_instance_private (self);
- g_autoptr(IdeTask) task = NULL;
g_return_if_fail (IDE_IS_BUILD_STAGE (self));
g_return_if_fail (IDE_IS_BUILD_PIPELINE (pipeline));
diff --git a/src/libide/completion/ide-completion-provider.c b/src/libide/completion/ide-completion-provider.c
index cd202af0f..ec0c04e3b 100644
--- a/src/libide/completion/ide-completion-provider.c
+++ b/src/libide/completion/ide-completion-provider.c
@@ -127,8 +127,6 @@ ide_completion_provider_populate_async (IdeCompletionProvider *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
- g_autoptr(GListModel) results = NULL;
-
g_return_if_fail (IDE_IS_COMPLETION_PROVIDER (self));
g_return_if_fail (IDE_IS_COMPLETION_CONTEXT (context));
g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
diff --git a/src/libide/devices/ide-device-info.c b/src/libide/devices/ide-device-info.c
index 0785e52bf..a1ebbe1e8 100644
--- a/src/libide/devices/ide-device-info.c
+++ b/src/libide/devices/ide-device-info.c
@@ -105,7 +105,6 @@ static void
ide_device_info_class_init (IdeDeviceInfoClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_autofree gchar *arch = ide_get_system_arch ();
object_class->finalize = ide_device_info_finalize;
object_class->get_property = ide_device_info_get_property;
diff --git a/src/libide/layout/ide-layout-stack.c b/src/libide/layout/ide-layout-stack.c
index ded44218a..18eb3659b 100644
--- a/src/libide/layout/ide-layout-stack.c
+++ b/src/libide/layout/ide-layout-stack.c
@@ -649,9 +649,9 @@ ide_layout_stack_pan_end (IdeLayoutStack *self,
IDE_TRACE_MSG ("Moving view to a previously non-existant column");
- gtk_container_remove (GTK_CONTAINER (priv->stack), GTK_WIDGET (priv->pan_view));
- gtk_widget_show (GTK_WIDGET (priv->pan_view));
- gtk_container_add (GTK_CONTAINER (dest_priv->stack), GTK_WIDGET (priv->pan_view));
+ gtk_container_remove (GTK_CONTAINER (priv->stack), GTK_WIDGET (view));
+ gtk_widget_show (GTK_WIDGET (view));
+ gtk_container_add (GTK_CONTAINER (dest_priv->stack), GTK_WIDGET (view));
}
cleanup:
diff --git a/src/libide/plugins/ide-extension-util.c b/src/libide/plugins/ide-extension-util.c
index af0143c53..1f5530ed8 100644
--- a/src/libide/plugins/ide-extension-util.c
+++ b/src/libide/plugins/ide-extension-util.c
@@ -267,5 +267,5 @@ ide_extension_new (PeasEngine *engine,
plugin_info,
type,
params->len,
- (GParameter *)params->data);
+ (GParameter *)(gpointer)params->data);
}
diff --git a/src/libide/runner/ide-run-manager.c b/src/libide/runner/ide-run-manager.c
index dd2f49220..1be8e5c5a 100644
--- a/src/libide/runner/ide-run-manager.c
+++ b/src/libide/runner/ide-run-manager.c
@@ -406,7 +406,6 @@ static void
do_run_async (IdeRunManager *self,
IdeTask *task)
{
- g_auto(GStrv) run_argv = NULL;
IdeBuildTarget *build_target;
IdeContext *context;
IdeConfigurationManager *config_manager;
diff --git a/src/libide/search/ide-search-engine.c b/src/libide/search/ide-search-engine.c
index 8a7d419d7..be77c87c2 100644
--- a/src/libide/search/ide-search-engine.c
+++ b/src/libide/search/ide-search-engine.c
@@ -257,7 +257,6 @@ ide_search_engine_search_async (IdeSearchEngine *self,
gpointer user_data)
{
g_autoptr(IdeTask) task = NULL;
- g_autoptr(GListStore) store = NULL;
Request *r;
g_return_if_fail (IDE_IS_SEARCH_ENGINE (self));
diff --git a/src/libide/snippets/ide-snippet-storage.c b/src/libide/snippets/ide-snippet-storage.c
index 32c4615b1..2dc1ff4e9 100644
--- a/src/libide/snippets/ide-snippet-storage.c
+++ b/src/libide/snippets/ide-snippet-storage.c
@@ -356,7 +356,7 @@ ide_snippet_storage_query (IdeSnippetStorage *self,
if (g_strcmp0 (base->lang, lang) != 0)
break;
- if (!g_str_has_prefix (base->name, prefix) != 0)
+ if (!g_str_has_prefix (base->name, prefix))
break;
foreach (self, base, user_data);
diff --git a/src/libide/subprocess/ide-breakout-subprocess.c b/src/libide/subprocess/ide-breakout-subprocess.c
index ebc868d67..3cbba0e8d 100644
--- a/src/libide/subprocess/ide-breakout-subprocess.c
+++ b/src/libide/subprocess/ide-breakout-subprocess.c
@@ -930,7 +930,6 @@ static gboolean
sigterm_handler (gpointer user_data)
{
IdeBreakoutSubprocess *self = user_data;
- g_autoptr(GDBusConnection) bus = NULL;
IDE_ENTRY;
@@ -955,7 +954,6 @@ static gboolean
sigint_handler (gpointer user_data)
{
IdeBreakoutSubprocess *self = user_data;
- g_autoptr(GDBusConnection) bus = NULL;
IDE_ENTRY;
@@ -1030,16 +1028,6 @@ maybe_create_output_stream (GOutputStream **ret,
*fdptr = -1;
}
-static inline void
-set_error_from_errno (GError **error)
-{
- g_set_error (error,
- G_IO_ERROR,
- g_io_error_from_errno (errno),
- "%s",
- g_strerror (errno));
-}
-
static void
ide_breakout_subprocess_complete_command_locked (IdeBreakoutSubprocess *self,
gint exit_status)
diff --git a/src/libide/util/ide-glib.c b/src/libide/util/ide-glib.c
index 003894e70..1070dd4f3 100644
--- a/src/libide/util/ide-glib.c
+++ b/src/libide/util/ide-glib.c
@@ -213,7 +213,6 @@ ide_g_file_get_uncanonical_relative_path (GFile *file,
{
g_autoptr(GFile) ancestor = NULL;
g_autoptr(GString) relatives = NULL;
- g_autofree gchar *scheme = NULL;
g_autofree gchar *path = NULL;
g_autofree gchar *suffix = NULL;
diff --git a/src/plugins/autotools/ide-autotools-makecache-stage.c
b/src/plugins/autotools/ide-autotools-makecache-stage.c
index efc1e7a48..5ec7455af 100644
--- a/src/plugins/autotools/ide-autotools-makecache-stage.c
+++ b/src/plugins/autotools/ide-autotools-makecache-stage.c
@@ -200,7 +200,6 @@ ide_autotools_makecache_stage_new_for_pipeline (IdeBuildPipeline *pipeline,
GError **error)
{
g_autoptr(IdeAutotoolsMakecacheStage) stage = NULL;
- g_autoptr(GFile) cache_file = NULL;
g_autoptr(IdeSubprocessLauncher) launcher = NULL;
g_autofree gchar *cache_path = NULL;
const gchar *make = "make";
diff --git a/src/plugins/clang/gnome-builder-clang.c b/src/plugins/clang/gnome-builder-clang.c
index 109b75f35..b0cdfe591 100644
--- a/src/plugins/clang/gnome-builder-clang.c
+++ b/src/plugins/clang/gnome-builder-clang.c
@@ -219,7 +219,6 @@ handle_index_file (JsonrpcServer *server,
GVariant *params,
IdeClang *clang)
{
- g_autoptr(GPtrArray) argv = NULL;
g_autoptr(ClientOp) op = NULL;
g_auto(GStrv) flags = NULL;
const gchar *path = NULL;
@@ -258,7 +257,6 @@ handle_get_index_key_cb (IdeClang *clang,
g_autoptr(ClientOp) op = user_data;
g_autoptr(GError) error = NULL;
g_autofree gchar *key = NULL;
- g_autoptr(GVariant) reply = NULL;
g_assert (IDE_IS_CLANG (clang));
g_assert (G_IS_ASYNC_RESULT (result));
@@ -286,7 +284,6 @@ handle_get_index_key (JsonrpcServer *server,
GVariant *params,
IdeClang *clang)
{
- g_autoptr(GPtrArray) argv = NULL;
g_autoptr(ClientOp) op = NULL;
g_auto(GStrv) flags = NULL;
const gchar *path = NULL;
@@ -360,7 +357,6 @@ handle_find_nearest_scope (JsonrpcServer *server,
GVariant *params,
IdeClang *clang)
{
- g_autoptr(GPtrArray) argv = NULL;
g_autoptr(ClientOp) op = NULL;
g_auto(GStrv) flags = NULL;
const gchar *path = NULL;
@@ -444,7 +440,6 @@ handle_diagnose (JsonrpcServer *server,
GVariant *params,
IdeClang *clang)
{
- g_autoptr(GPtrArray) argv = NULL;
g_autoptr(ClientOp) op = NULL;
g_auto(GStrv) flags = NULL;
const gchar *path = NULL;
@@ -508,7 +503,6 @@ handle_locate_symbol (JsonrpcServer *server,
GVariant *params,
IdeClang *clang)
{
- g_autoptr(GPtrArray) argv = NULL;
g_autoptr(ClientOp) op = NULL;
g_auto(GStrv) flags = NULL;
const gchar *path;
@@ -578,7 +572,6 @@ handle_get_symbol_tree (JsonrpcServer *server,
GVariant *params,
IdeClang *clang)
{
- g_autoptr(GPtrArray) argv = NULL;
g_autoptr(ClientOp) op = NULL;
g_auto(GStrv) flags = NULL;
const gchar *path;
@@ -642,7 +635,6 @@ handle_complete (JsonrpcServer *server,
GVariant *params,
IdeClang *clang)
{
- g_autoptr(GPtrArray) argv = NULL;
g_autoptr(ClientOp) op = NULL;
g_auto(GStrv) flags = NULL;
const gchar *path;
@@ -714,7 +706,6 @@ handle_get_highlight_index (JsonrpcServer *server,
GVariant *params,
IdeClang *clang)
{
- g_autoptr(GPtrArray) argv = NULL;
g_autoptr(ClientOp) op = NULL;
g_auto(GStrv) flags = NULL;
const gchar *path;
diff --git a/src/plugins/clang/ide-clang-proposals.c b/src/plugins/clang/ide-clang-proposals.c
index 8cb47221b..9f855412d 100644
--- a/src/plugins/clang/ide-clang-proposals.c
+++ b/src/plugins/clang/ide-clang-proposals.c
@@ -143,12 +143,6 @@ query_free (gpointer data)
g_slice_free (Query, q);
}
-static inline gboolean
-is_symbol_char (gunichar ch)
-{
- return g_unichar_isalnum (ch) || ch == '_';
-}
-
static void
ide_clang_proposals_finalize (GObject *object)
{
@@ -614,7 +608,6 @@ ide_clang_proposals_populate_async (IdeClangProposals *self,
{
g_autoptr(GCancellable) prev_cancellable = NULL;
g_autoptr(IdeTask) task = NULL;
- g_autofree gchar *slice = NULL;
GtkTextBuffer *buffer;
GtkTextIter begin;
GtkTextIter previous;
diff --git a/src/plugins/clang/ide-clang-symbol-node.c b/src/plugins/clang/ide-clang-symbol-node.c
index 2c572eb7c..5a1a8abc8 100644
--- a/src/plugins/clang/ide-clang-symbol-node.c
+++ b/src/plugins/clang/ide-clang-symbol-node.c
@@ -38,7 +38,6 @@ ide_clang_symbol_node_new (IdeContext *context,
{
g_autoptr(IdeSymbol) symbol = NULL;
g_autoptr(GVariant) children = NULL;
- g_autoptr(GVariant) unboxed = NULL;
IdeClangSymbolNode *self;
const gchar *name;
diff --git a/src/plugins/cmake/gbp-cmake-build-stage-cross-file.c
b/src/plugins/cmake/gbp-cmake-build-stage-cross-file.c
index 1cf34f89f..db7193cee 100644
--- a/src/plugins/cmake/gbp-cmake-build-stage-cross-file.c
+++ b/src/plugins/cmake/gbp-cmake-build-stage-cross-file.c
@@ -91,8 +91,6 @@ add_lang_executable (const gchar *lang,
const gchar *path,
gchar **content)
{
- g_autofree gchar *lang_compiler = NULL;
-
if (g_strcmp0 (lang, IDE_TOOLCHAIN_LANGUAGE_C) == 0)
_gbp_cmake_file_set_quoted (content, "CMAKE_C_COMPILER", path);
else if (g_strcmp0 (lang, IDE_TOOLCHAIN_LANGUAGE_CPLUSPLUS) == 0)
diff --git a/src/plugins/cmake/gbp-cmake-build-system.c b/src/plugins/cmake/gbp-cmake-build-system.c
index a85581005..5504f77a3 100644
--- a/src/plugins/cmake/gbp-cmake-build-system.c
+++ b/src/plugins/cmake/gbp-cmake-build-system.c
@@ -186,7 +186,6 @@ gbp_cmake_build_system_load_commands_config_cb (GObject *object,
GbpCMakeBuildSystem *self = (GbpCMakeBuildSystem *)object;
g_autoptr(IdeCompileCommands) compile_commands = NULL;
g_autoptr(IdeTask) task = user_data;
- g_autoptr(GFileMonitor) monitor = NULL;
g_autoptr(GError) error = NULL;
g_autoptr(GFile) file = NULL;
g_autofree gchar *path = NULL;
diff --git a/src/plugins/ctags/ide-ctags-service.c b/src/plugins/ctags/ide-ctags-service.c
index 869f321dc..dfd7f1fcf 100644
--- a/src/plugins/ctags/ide-ctags-service.c
+++ b/src/plugins/ctags/ide-ctags-service.c
@@ -421,7 +421,6 @@ ide_ctags_service_do_mine (gpointer data)
IdeCtagsService *self = data;
g_autoptr(GTask) task = NULL;
g_autoptr(GArray) mine_info = NULL;
- g_autofree gchar *path = NULL;
IdeContext *context;
MineInfo info;
GFile *workdir;
diff --git a/src/plugins/flatpak/gbp-flatpak-build-system-discovery.c
b/src/plugins/flatpak/gbp-flatpak-build-system-discovery.c
index 581c6ff4b..2f33deaca 100644
--- a/src/plugins/flatpak/gbp-flatpak-build-system-discovery.c
+++ b/src/plugins/flatpak/gbp-flatpak-build-system-discovery.c
@@ -62,7 +62,6 @@ gbp_flatpak_build_system_discovery_find_manifests (GFile *directory,
g_autoptr(GFileInfo) info = infoptr;
g_autoptr(GMatchInfo) match_info = NULL;
g_autoptr(GFile) file = NULL;
- g_autofree gchar *path = NULL;
GFileType file_type;
const gchar *name;
diff --git a/src/plugins/flatpak/gbp-flatpak-clone-widget.c b/src/plugins/flatpak/gbp-flatpak-clone-widget.c
index 4f9dc9b59..39bfece89 100644
--- a/src/plugins/flatpak/gbp-flatpak-clone-widget.c
+++ b/src/plugins/flatpak/gbp-flatpak-clone-widget.c
@@ -491,7 +491,6 @@ get_source (GbpFlatpakCloneWidget *self,
JsonArray *sources = NULL;
guint num_modules;
ModuleSource *src;
- g_autoptr(IdeVcsUri) uri = NULL;
GPtrArray *patches;
parser = json_parser_new ();
@@ -576,7 +575,6 @@ gbp_flatpak_clone_widget_clone_async (GbpFlatpakCloneWidget *self,
g_autoptr(IdeTask) task = NULL;
g_autoptr(GFile) destination = NULL;
g_autoptr(GError) error = NULL;
- g_autofree gchar *path = NULL;
DownloadRequest *req;
ModuleSource *src;
diff --git a/src/plugins/flatpak/gbp-flatpak-configuration-provider.c
b/src/plugins/flatpak/gbp-flatpak-configuration-provider.c
index 2e5396db3..d93fba1db 100644
--- a/src/plugins/flatpak/gbp-flatpak-configuration-provider.c
+++ b/src/plugins/flatpak/gbp-flatpak-configuration-provider.c
@@ -266,7 +266,6 @@ static void
manifest_needs_reload (GbpFlatpakConfigurationProvider *self,
GbpFlatpakManifest *manifest)
{
- g_autoptr(IdeTask) task = NULL;
GFile *file;
IDE_ENTRY;
diff --git a/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c
b/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c
index 868e36d68..e5a74129f 100644
--- a/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c
+++ b/src/plugins/flatpak/gbp-flatpak-pipeline-addin.c
@@ -601,7 +601,6 @@ register_build_bundle_stage (GbpFlatpakPipelineAddin *self,
g_autoptr(IdeSubprocessLauncher) launcher = NULL;
g_autofree gchar *staging_dir = NULL;
g_autofree gchar *repo_dir = NULL;
- g_autofree gchar *export_path = NULL;
g_autofree gchar *dest_path = NULL;
g_autofree gchar *arch = NULL;
g_autofree gchar *name = NULL;
diff --git a/src/plugins/flatpak/gbp-flatpak-runner.c b/src/plugins/flatpak/gbp-flatpak-runner.c
index fc2b4f6ee..3a81e45e0 100644
--- a/src/plugins/flatpak/gbp-flatpak-runner.c
+++ b/src/plugins/flatpak/gbp-flatpak-runner.c
@@ -57,7 +57,7 @@ gbp_flatpak_runner_fixup_launcher (IdeRunner *runner,
IdeConfigurationManager *config_manager;
IdeConfiguration *config;
IdeEnvironment *env;
- g_auto(GStrv) environ = NULL;
+ g_auto(GStrv) environ_ = NULL;
const gchar *app_id;
IdeContext *context;
guint i = 0;
@@ -122,11 +122,11 @@ gbp_flatpak_runner_fixup_launcher (IdeRunner *runner,
/* Proxy environment stuff to the launcher */
if ((env = ide_runner_get_environment (runner)) &&
- (environ = ide_environment_get_environ (env)))
+ (environ_ = ide_environment_get_environ (env)))
{
- for (guint j = 0; environ[j]; j++)
+ for (guint j = 0; environ_[j]; j++)
{
- g_autofree gchar *arg = g_strdup_printf ("--env=%s", environ[j]);
+ g_autofree gchar *arg = g_strdup_printf ("--env=%s", environ_[j]);
ide_subprocess_launcher_insert_argv (launcher, i++, arg);
}
}
diff --git a/src/plugins/flatpak/gbp-flatpak-runtime-provider.c
b/src/plugins/flatpak/gbp-flatpak-runtime-provider.c
index 14f125e9f..ceadd8920 100644
--- a/src/plugins/flatpak/gbp-flatpak-runtime-provider.c
+++ b/src/plugins/flatpak/gbp-flatpak-runtime-provider.c
@@ -650,7 +650,6 @@ gbp_flatpak_runtime_provider_bootstrap_async (IdeRuntimeProvider *provider,
if (GBP_IS_FLATPAK_MANIFEST (state->config))
{
- g_autofree gchar *platform_id = NULL;
IdeTransferManager *transfer_manager;
GbpFlatpakApplicationAddin *addin;
const gchar * const *sdk_exts;
diff --git a/src/plugins/flatpak/gbp-flatpak-runtime.c b/src/plugins/flatpak/gbp-flatpak-runtime.c
index 9eb8d2c38..0ca06c101 100644
--- a/src/plugins/flatpak/gbp-flatpak-runtime.c
+++ b/src/plugins/flatpak/gbp-flatpak-runtime.c
@@ -803,7 +803,6 @@ gbp_flatpak_runtime_new (IdeContext *context,
g_autofree gchar *id = NULL;
g_autofree gchar *display_name = NULL;
g_autofree gchar *triplet = NULL;
- g_autoptr(FlatpakRef) sdk_ref = NULL;
g_autoptr(IdeTriplet) triplet_object = NULL;
const gchar *name;
const gchar *arch;
diff --git a/src/plugins/gcc/gbp-gcc-toolchain-provider.c b/src/plugins/gcc/gbp-gcc-toolchain-provider.c
index 2a1ac0cb3..0c36d1019 100644
--- a/src/plugins/gcc/gbp-gcc-toolchain-provider.c
+++ b/src/plugins/gcc/gbp-gcc-toolchain-provider.c
@@ -260,15 +260,15 @@ gbp_gcc_toolchain_provider_search_init (GbpGccToolchainProvider *self,
{
GList *folders = NULL;
g_autoptr (IdeTask) task = NULL;
- g_auto(GStrv) environ = NULL;
+ g_auto(GStrv) environ_ = NULL;
g_auto(GStrv) paths = NULL;
const gchar *path_env;
FileSearching *file_searching;
g_assert (GBP_IS_GCC_TOOLCHAIN_PROVIDER (self));
- environ = g_get_environ ();
- path_env = g_environ_getenv (environ, "PATH");
+ environ_ = g_get_environ ();
+ path_env = g_environ_getenv (environ_, "PATH");
paths = g_strsplit (path_env, ":", -1);
for (int i = 0; paths[i] != NULL; i++)
folders = g_list_append (folders, g_file_new_for_path (paths[i]));
diff --git a/src/plugins/gdb/gbp-gdb-debugger.c b/src/plugins/gdb/gbp-gdb-debugger.c
index 7d61fe6ac..da7d6593d 100644
--- a/src/plugins/gdb/gbp-gdb-debugger.c
+++ b/src/plugins/gdb/gbp-gdb-debugger.c
@@ -100,7 +100,6 @@ gbp_gdb_debugger_translate_path (GbpGdbDebugger *self,
const gchar *path)
{
g_autoptr(GFile) file = NULL;
- g_autoptr(GFile) result = NULL;
IdeRuntime *runtime = NULL;
IdeRunner *runner;
@@ -2638,7 +2637,6 @@ gbp_gdb_debugger_connect (GbpGdbDebugger *self,
GIOStream *io_stream,
GCancellable *cancellable)
{
- g_autoptr(GError) error = NULL;
GInputStream *stream;
g_return_if_fail (GBP_IS_GDB_DEBUGGER (self));
diff --git a/src/plugins/git/ide-git-vcs.c b/src/plugins/git/ide-git-vcs.c
index 1853f4e11..33f539290 100644
--- a/src/plugins/git/ide-git-vcs.c
+++ b/src/plugins/git/ide-git-vcs.c
@@ -170,7 +170,6 @@ ide_git_vcs_discover (IdeGitVcs *self,
{
g_autofree gchar *name = NULL;
g_autoptr(GFile) parent = NULL;
- g_autoptr(GFile) git = NULL;
g_autoptr(GFile) child = NULL;
g_assert (IDE_IS_GIT_VCS (self));
diff --git a/src/plugins/meson/gbp-meson-build-system.c b/src/plugins/meson/gbp-meson-build-system.c
index 1de5fe316..4ffa5f18b 100644
--- a/src/plugins/meson/gbp-meson-build-system.c
+++ b/src/plugins/meson/gbp-meson-build-system.c
@@ -184,7 +184,6 @@ gbp_meson_build_system_load_commands_config_cb (GObject *object,
GbpMesonBuildSystem *self = (GbpMesonBuildSystem *)object;
g_autoptr(IdeCompileCommands) compile_commands = NULL;
g_autoptr(IdeTask) task = user_data;
- g_autoptr(GFileMonitor) monitor = NULL;
g_autoptr(GError) error = NULL;
g_autoptr(GFile) file = NULL;
g_autofree gchar *path = NULL;
@@ -444,7 +443,6 @@ gbp_meson_build_system_get_build_flags_for_files_cb (GObject *object,
g_autoptr(IdeCompileCommands) compile_commands = NULL;
g_autoptr(IdeTask) task = user_data;
g_autoptr(GError) error = NULL;
- g_autoptr(GFile) directory = NULL;
g_autoptr(GHashTable) ret = NULL;
g_auto(GStrv) system_includes = NULL;
IdeConfigurationManager *config_manager;
diff --git a/src/plugins/meson/gbp-meson-test-provider.c b/src/plugins/meson/gbp-meson-test-provider.c
index c3736b52f..c0fbe4609 100644
--- a/src/plugins/meson/gbp-meson-test-provider.c
+++ b/src/plugins/meson/gbp-meson-test-provider.c
@@ -56,7 +56,7 @@ gbp_meson_test_provider_load_json (GbpMesonTestProvider *self,
g_autoptr(IdeEnvironment) env = ide_environment_new ();
g_autoptr(IdeTest) test = NULL;
g_autoptr(GFile) workdir = NULL;
- g_auto(GStrv) environ = NULL;
+ g_auto(GStrv) environ_ = NULL;
const gchar *name;
const gchar *workdir_path;
const gchar *group = NULL;
@@ -130,14 +130,14 @@ gbp_meson_test_provider_load_json (GbpMesonTestProvider *self,
g_ptr_array_add (cmd, NULL);
- environ = ide_environment_get_environ (env);
- if (ide_strv_empty0 (environ))
- g_clear_pointer (&environ, g_strfreev);
+ environ_ = ide_environment_get_environ (env);
+ if (ide_strv_empty0 (environ_))
+ g_clear_pointer (&environ_, g_strfreev);
test = g_object_new (GBP_TYPE_MESON_TEST,
"command", (gchar **)cmd->pdata,
"display-name", name,
- "environ", environ,
+ "environ", environ_,
"group", group,
"id", name,
"timeout", timeout,
@@ -384,13 +384,12 @@ gbp_meson_test_provider_run_build_cb (GObject *object,
gpointer user_data)
{
IdeBuildPipeline *pipeline = (IdeBuildPipeline *)object;
- g_autoptr(IdeSubprocess) subprocess = NULL;
g_autoptr(IdeRunner) runner = NULL;
g_autoptr(IdeTask) task = user_data;
g_autoptr(GError) error = NULL;
GCancellable *cancellable;
const gchar * const *command;
- const gchar * const *environ;
+ const gchar * const *environ_;
const gchar *builddir;
IdeRuntime *runtime;
IdeTest *test;
@@ -448,16 +447,16 @@ gbp_meson_test_provider_run_build_cb (GObject *object,
ide_runner_push_args (runner, command);
/* Make sure the environment is respected */
- if ((environ = gbp_meson_test_get_environ (GBP_MESON_TEST (test))))
+ if ((environ_ = gbp_meson_test_get_environ (GBP_MESON_TEST (test))))
{
IdeEnvironment *dest = ide_runner_get_environment (runner);
- for (guint i = 0; environ[i] != NULL; i++)
+ for (guint i = 0; environ_[i] != NULL; i++)
{
g_autofree gchar *key = NULL;
g_autofree gchar *value = NULL;
- if (ide_environ_parse (environ[i], &key, &value))
+ if (ide_environ_parse (environ_[i], &key, &value))
ide_environment_setenv (dest, key, value);
}
}
diff --git a/src/plugins/meson/gbp-meson-toolchain-edition-preferences-row.c
b/src/plugins/meson/gbp-meson-toolchain-edition-preferences-row.c
index 52a61731c..33c602575 100644
--- a/src/plugins/meson/gbp-meson-toolchain-edition-preferences-row.c
+++ b/src/plugins/meson/gbp-meson-toolchain-edition-preferences-row.c
@@ -379,7 +379,6 @@ gbp_meson_toolchain_edition_preferences_row_show_popup (GbpMesonToolchainEdition
static void
gbp_meson_toolchain_edition_preferences_row_constructed (GObject *object)
{
- g_autofree gchar *value = NULL;
GbpMesonToolchainEditionPreferencesRow *self = (GbpMesonToolchainEditionPreferencesRow *) object;
GtkWidget *label;
diff --git a/src/plugins/meson/gbp-meson-toolchain-provider.c
b/src/plugins/meson/gbp-meson-toolchain-provider.c
index ba3d9a550..8b20bdb7e 100644
--- a/src/plugins/meson/gbp-meson-toolchain-provider.c
+++ b/src/plugins/meson/gbp-meson-toolchain-provider.c
@@ -255,7 +255,6 @@ gbp_meson_toolchain_provider_load_async (IdeToolchainProvider *provider,
gpointer user_data)
{
GbpMesonToolchainProvider *self = (GbpMesonToolchainProvider *)provider;
- g_autoptr(IdeTask) task = NULL;
IDE_ENTRY;
diff --git a/src/plugins/sysprof/gbp-sysprof-workbench-addin.c
b/src/plugins/sysprof/gbp-sysprof-workbench-addin.c
index f21f27a4f..3d3cdb8a2 100644
--- a/src/plugins/sysprof/gbp-sysprof-workbench-addin.c
+++ b/src/plugins/sysprof/gbp-sysprof-workbench-addin.c
@@ -158,7 +158,6 @@ profiler_run_handler (IdeRunManager *run_manager,
g_autoptr(SpSource) proc_source = NULL;
g_autoptr(SpSource) perf_source = NULL;
g_autoptr(SpSource) hostinfo_source = NULL;
- g_autofree gchar *sysroot = NULL;
IdeContext *context;
g_assert (GBP_IS_SYSPROF_WORKBENCH_ADDIN (self));
diff --git a/src/plugins/sysroot/gbp-sysroot-runtime.c b/src/plugins/sysroot/gbp-sysroot-runtime.c
index 002985fa4..10e827b76 100644
--- a/src/plugins/sysroot/gbp-sysroot-runtime.c
+++ b/src/plugins/sysroot/gbp-sysroot-runtime.c
@@ -96,7 +96,6 @@ gbp_sysroot_runtime_create_launcher (IdeRuntime *runtime,
g_autofree gchar *pkgconfig_dirs = NULL;
g_autofree gchar *cflags = NULL;
g_autofree gchar *ldflags = NULL;
- g_auto(GStrv) path_parts = NULL;
const gchar *previous_env = NULL;
const gchar *sysroot_id = NULL;
diff --git a/src/plugins/todo/gbp-todo-panel.c b/src/plugins/todo/gbp-todo-panel.c
index d5d1975ca..2e24f2119 100644
--- a/src/plugins/todo/gbp-todo-panel.c
+++ b/src/plugins/todo/gbp-todo-panel.c
@@ -49,7 +49,6 @@ gbp_todo_panel_cell_data_func (GtkCellLayout *cell_layout,
gpointer data)
{
g_autoptr(GbpTodoItem) item = NULL;
- g_autofree gchar *markup = NULL;
const gchar *message;
gtk_tree_model_get (tree_model, iter, 0, &item, -1);
diff --git a/src/plugins/words/gbp-word-proposals.c b/src/plugins/words/gbp-word-proposals.c
index 66cd180de..c905c1c63 100644
--- a/src/plugins/words/gbp-word-proposals.c
+++ b/src/plugins/words/gbp-word-proposals.c
@@ -341,7 +341,6 @@ void
gbp_word_proposals_refilter (GbpWordProposals *self,
const gchar *word)
{
- g_autofree gchar *casefold = NULL;
guint old_len = 0;
g_return_if_fail (GBP_IS_WORD_PROPOSALS (self));
diff --git a/src/tests/test-ide-task.c b/src/tests/test-ide-task.c
index 6f7412dfe..291fe6997 100644
--- a/src/tests/test-ide-task.c
+++ b/src/tests/test-ide-task.c
@@ -251,7 +251,6 @@ test_ide_task_is_valid (void)
g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL);
g_autoptr(IdeTask) task = ide_task_new (NULL, NULL, NULL, NULL);
g_autoptr(IdeTask) task2 = ide_task_new (obj, NULL, NULL, NULL);
- g_autoptr(GError) error = NULL;
g_assert (ide_task_is_valid (task, NULL));
g_assert (!ide_task_is_valid (task, obj));
@@ -434,7 +433,6 @@ test_ide_task_completed_threaded (void)
g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL);
g_autoptr(GCancellable) cancellable = g_cancellable_new ();
g_autoptr(IdeTask) task = ide_task_new (obj, cancellable, check_int, g_main_loop_ref (main_loop));
- g_autoptr(GError) error = NULL;
guint count = 0;
g_signal_connect (task, "notify::completed", G_CALLBACK (inc_completed), &count);
@@ -467,7 +465,6 @@ test_ide_task_task_data_threaded (void)
g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL);
g_autoptr(GCancellable) cancellable = g_cancellable_new ();
g_autoptr(IdeTask) task = ide_task_new (obj, cancellable, check_int, g_main_loop_ref (main_loop));
- g_autoptr(GError) error = NULL;
gint *n = g_new0 (gint, 1);
ide_task_set_task_data (task, n, g_free);
@@ -523,7 +520,6 @@ test_ide_task_task_data_set_in_thread (void)
{
g_autoptr(GMainLoop) main_loop = g_main_loop_new (NULL, FALSE);
g_autoptr(IdeTask) task = ide_task_new (NULL, NULL, set_in_thread_cb, g_main_loop_ref (main_loop));
- g_autoptr(GError) error = NULL;
ide_task_run_in_thread (task, set_in_thread_worker);
g_main_loop_run (main_loop);
diff --git a/src/tests/test-snippet-parser.c b/src/tests/test-snippet-parser.c
index 3cf774cb4..53412dba5 100644
--- a/src/tests/test-snippet-parser.c
+++ b/src/tests/test-snippet-parser.c
@@ -8,14 +8,10 @@ main (gint argc,
gchar *argv[])
{
GOptionContext *context;
- GOptionEntry entries[] = {
- NULL
- };
GError *error = NULL;
gint i;
context = g_option_context_new ("[FILES...] - test snippet parsing");
- g_option_context_add_main_entries (context, entries, NULL);
if (!g_option_context_parse (context, &argc, &argv, &error))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]