aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorDHE <[email protected]>2016-03-27 15:58:27 -0400
committerBrian Behlendorf <[email protected]>2016-03-30 09:36:51 -0700
commite3e7cf6026f0761c155ae7920b03fb76c7ad5df8 (patch)
treedaffbe2da983f5893de10631b249705dd487df30 /module/zfs
parentc35b188246899714c156a52fdea179eab3717e92 (diff)
gcc build error: -Wbool-compare in metaslab.c
When debugging is enabled on a very recent version of gcc (tested with 5.3.0), DVA_SET_GANG(dva, !!(flags)) fails because an assertion causes a comparison between what is technically a boolean and an integer. Signed-off-by: DHE <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #4465
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/metaslab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c
index 19323cdb8..c2c1d2dfc 100644
--- a/module/zfs/metaslab.c
+++ b/module/zfs/metaslab.c
@@ -2390,7 +2390,8 @@ top:
DVA_SET_VDEV(&dva[d], vd->vdev_id);
DVA_SET_OFFSET(&dva[d], offset);
- DVA_SET_GANG(&dva[d], !!(flags & METASLAB_GANG_HEADER));
+ DVA_SET_GANG(&dva[d],
+ ((flags & METASLAB_GANG_HEADER) ? 1 : 0));
DVA_SET_ASIZE(&dva[d], asize);
if (flags & METASLAB_FASTWRITE) {