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

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