Blame SOURCES/0001-swtpm_setup-fix-Werror-maybe-uninitialized.patch

85f7ff
From 95cd8db3dc822d8f741b90d560e50f44841f9d29 Mon Sep 17 00:00:00 2001
85f7ff
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
85f7ff
Date: Tue, 22 Nov 2022 11:24:57 +0400
85f7ff
Subject: [PATCH] swtpm_setup: fix -Werror=maybe-uninitialized
85f7ff
MIME-Version: 1.0
85f7ff
Content-Type: text/plain; charset=UTF-8
85f7ff
Content-Transfer-Encoding: 8bit
85f7ff
85f7ff
/usr/include/glib-2.0/glib/glib-autocleanups.h:30:3: error: ‘argv’ may be used uninitialized [-Werror=maybe-uninitialized]
85f7ff
   30 |   g_free (*pp);
85f7ff
      |   ^~~~~~~~~~~~
85f7ff
swtpm_setup.c: In function ‘get_swtpm_capabilities.constprop.0’:
85f7ff
swtpm_setup.c:940:24: note: ‘argv’ was declared here
85f7ff
  940 |     g_autofree gchar **argv;
85f7ff
      |                        ^~~~
85f7ff
85f7ff
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
85f7ff
---
85f7ff
 src/swtpm_setup/swtpm_setup.c | 2 +-
85f7ff
 1 file changed, 1 insertion(+), 1 deletion(-)
85f7ff
85f7ff
diff --git a/src/swtpm_setup/swtpm_setup.c b/src/swtpm_setup/swtpm_setup.c
85f7ff
index 1b528c8..3570235 100644
85f7ff
--- a/src/swtpm_setup/swtpm_setup.c
85f7ff
+++ b/src/swtpm_setup/swtpm_setup.c
85f7ff
@@ -937,7 +937,7 @@ static int get_swtpm_capabilities(gchar **swtpm_prg_l, gboolean is_tpm2,
85f7ff
     gchar *my_argv[] = { "--print-capabilities", is_tpm2 ? "--tpm2" : NULL, NULL };
85f7ff
     g_autofree gchar *logop = NULL;
85f7ff
     g_autoptr(GError) error = NULL;
85f7ff
-    g_autofree gchar **argv;
85f7ff
+    g_autofree gchar **argv = NULL;
85f7ff
     int exit_status = 0;
85f7ff
     gboolean success;
85f7ff
     int ret = 1;
85f7ff
-- 
85f7ff
2.38.1
85f7ff