summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorloli10K <[email protected]>2019-09-16 19:46:02 +0200
committerBrian Behlendorf <[email protected]>2019-09-16 10:46:02 -0700
commitb24771a8c9e4752456a2db69476388fb45a3f751 (patch)
treedea99b2d82703eaa4db19d7c87c134f5fb8d09b8 /module
parent7e15647ce9f404525eaa37c2bb95705f0caecd8a (diff)
Prevent gcc -Werror=maybe-uninitialized warnings in spa_wait_common()
This commit fixes the following build failure detected on Debian9 (GCC 6.3.0): CC [M] module/zfs/spa.o module/zfs/spa.c: In function ‘spa_wait_common.part.31’: module/zfs/spa.c:9468:6: error: ‘in_progress’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (!in_progress || spa->spa_waiters_cancel || error) ^ cc1: all warnings being treated as errors Reviewed-by: Chris Dunlop <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: John Gallagher <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #9326
Diffstat (limited to 'module')
-rw-r--r--module/zfs/spa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 0f1a2a9eb..7e5c474eb 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -9465,7 +9465,7 @@ spa_wait_common(const char *pool, zpool_wait_activity_t activity,
error = spa_activity_in_progress(spa, activity, use_tag, tag,
&in_progress);
- if (!in_progress || spa->spa_waiters_cancel || error)
+ if (error || !in_progress || spa->spa_waiters_cancel)
break;
*waited = B_TRUE;