[gnome-software/wip/run_job_cb-compiler-warning] plugin-loader: Fix a compiler warning from run_job_cb() when compiling without sysprof
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/run_job_cb-compiler-warning] plugin-loader: Fix a compiler warning from run_job_cb() when compiling without sysprof
- Date: Mon, 11 Jul 2022 12:04:23 +0000 (UTC)
commit 72575007652307075670fc75654d27de1b696699
Author: Milan Crha <mcrha redhat com>
Date: Mon Jul 11 14:02:08 2022 +0200
plugin-loader: Fix a compiler warning from run_job_cb() when compiling without sysprof
The `plugin_loader` variable is used only if the `HAVE_SYSPROF` is defined,
otherwise it's unused, which could be seen in the Debian CI, but not
in the Fedora CI, because Fedora compiles with the sysprof.
lib/gs-plugin-loader.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index cd08c5efd..2354ccdb5 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -3710,13 +3710,11 @@ run_job_cb (GObject *source_object,
GsPluginJob *plugin_job = GS_PLUGIN_JOB (source_object);
GsPluginJobClass *job_class;
g_autoptr(GTask) task = g_steal_pointer (&user_data);
- GsPluginLoader *plugin_loader = g_task_get_source_object (task);
+ g_autoptr(GError) local_error = NULL;
#ifdef HAVE_SYSPROF
+ GsPluginLoader *plugin_loader = g_task_get_source_object (task);
gint64 begin_time_nsec = GPOINTER_TO_SIZE (g_task_get_task_data (task));
-#endif /* HAVE_SYSPROF */
- g_autoptr(GError) local_error = NULL;
-#ifdef HAVE_SYSPROF
if (plugin_loader->sysprof_writer != NULL) {
g_autofree gchar *sysprof_name = g_strconcat ("process-thread:", G_OBJECT_TYPE_NAME
(plugin_job), NULL);
g_autofree gchar *sysprof_message = gs_plugin_job_to_string (plugin_job);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]