Blame SOURCES/0001-libmultipath-assign-variable-to-make-gcc-happy.patch

49190a
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
49190a
From: Benjamin Marzinski <bmarzins@redhat.com>
49190a
Date: Tue, 17 Mar 2020 17:28:24 -0500
49190a
Subject: [PATCH] libmultipath: assign variable to make gcc happy
49190a
MIME-Version: 1.0
49190a
Content-Type: text/plain; charset=UTF-8
49190a
Content-Transfer-Encoding: 8bit
49190a
49190a
There is nothing wrong with is_queueing not being set at the start
49190a
of __set_no_path_retry(), it will always get set before it is accessed,
49190a
but gcc 8.2.1 is failing with
49190a
49190a
structs_vec.c: In function ‘__set_no_path_retry’:
49190a
structs_vec.c:339:7: error: ‘is_queueing’ may be used uninitialized in
49190a
this function [-Werror=maybe-uninitialized]
49190a
  bool is_queueing;
49190a
       ^~~~~~~~~~~
49190a
49190a
so, assign a value to make it happy.
49190a
49190a
Reviewed-by: Martin Wilck <mwilck@suse.com>
49190a
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
49190a
---
49190a
 libmultipath/structs_vec.c | 2 +-
49190a
 1 file changed, 1 insertion(+), 1 deletion(-)
49190a
49190a
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
49190a
index 3dbbaa0f..077f2e42 100644
49190a
--- a/libmultipath/structs_vec.c
49190a
+++ b/libmultipath/structs_vec.c
49190a
@@ -336,7 +336,7 @@ static void leave_recovery_mode(struct multipath *mpp)
49190a
 
49190a
 void __set_no_path_retry(struct multipath *mpp, bool check_features)
49190a
 {
49190a
-	bool is_queueing;
49190a
+	bool is_queueing = false; /* assign a value to make gcc happy */
49190a
 
49190a
 	check_features = check_features && mpp->features != NULL;
49190a
 	if (check_features)
49190a
-- 
49190a
2.17.2
49190a