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