aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrooks Davis <[email protected]>2022-11-01 20:43:32 +0000
committerBrian Behlendorf <[email protected]>2022-11-03 10:16:16 -0700
commitabb42dc5e1d5073ac72d9294fa78ab2203406b1c (patch)
tree0dac2585fdf943b34026c9087329d8745e518e30 /lib
parentf47f6a055d0c282593fe701bcaa968225ba9d1fc (diff)
Make 1-bit bitfields unsigned
This fixes -Wsingle-bit-bitfield-constant-conversion warning from clang-16 like: lib/libzfs/libzfs_dataset.c:4529:19: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] flags.nounmount = B_TRUE; ^ ~~~~~~ Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Richard Yao <[email protected]> Signed-off-by: Brooks Davis <[email protected]> Closes #14125
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_pool.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c
index f0bb2370a..7f7e19a09 100644
--- a/lib/libzfs/libzfs_pool.c
+++ b/lib/libzfs/libzfs_pool.c
@@ -60,9 +60,9 @@
static boolean_t zpool_vdev_is_interior(const char *name);
typedef struct prop_flags {
- int create:1; /* Validate property on creation */
- int import:1; /* Validate property on import */
- int vdevprop:1; /* Validate property as a VDEV property */
+ unsigned int create:1; /* Validate property on creation */
+ unsigned int import:1; /* Validate property on import */
+ unsigned int vdevprop:1; /* Validate property as a VDEV property */
} prop_flags_t;
/*