]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/spa.c
Prevent gcc -Werror=maybe-uninitialized warnings in spa_wait_common()
authorloli10K <loli10K@users.noreply.github.com>
Mon, 16 Sep 2019 17:46:02 +0000 (19:46 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 16 Sep 2019 17:46:02 +0000 (10:46 -0700)
commitb24771a8c9e4752456a2db69476388fb45a3f751
treedea99b2d82703eaa4db19d7c87c134f5fb8d09b8
parent7e15647ce9f404525eaa37c2bb95705f0caecd8a
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 <chris@onthe.net.au>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Gallagher <john.gallagher@delphix.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #9326
module/zfs/spa.c