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