From f8c3ebcafcfd917abcf9fe4df5535f3d1d187e89 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 21 May 2021 16:50:27 +0100 Subject: [PATCH] trivial: Fix a compile warning when there is no polkit --- src/fu-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fu-util.c b/src/fu-util.c index 964596745..b63dec4f9 100644 --- a/src/fu-util.c +++ b/src/fu-util.c @@ -2769,7 +2769,6 @@ main (int argc, char *argv[]) g_autoptr(FuUtilPrivate) priv = g_new0 (FuUtilPrivate, 1); g_autoptr(GDateTime) dt_now = g_date_time_new_now_utc (); g_autoptr(GError) error = NULL; - g_autoptr(GError) error_polkit = NULL; g_autoptr(GPtrArray) cmd_array = fu_util_cmd_array_new (); g_autofree gchar *cmd_descriptions = NULL; g_autofree gchar *filter = NULL; @@ -3183,6 +3182,7 @@ main (int argc, char *argv[]) #ifdef HAVE_POLKIT /* start polkit tty agent to listen for password requests */ if (is_interactive) { + g_autoptr(GError) error_polkit = NULL; if (!fu_polkit_agent_open (&error_polkit)) { g_printerr ("Failed to open polkit agent: %s\n", error_polkit->message);