diff options
author | Brooks Davis <[email protected]> | 2022-11-01 20:43:32 +0000 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2022-12-01 12:39:43 -0800 |
commit | 572bd18c1f6c5856750c9c426302d690f8c528d7 (patch) | |
tree | 55e64adc3cffb7c26149f333593d5abf43d7376c /lib | |
parent | 256b74d0b034ff61709fca64d58f81746186eaef (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index e2912cdb9..e43ebb15c 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -59,8 +59,8 @@ 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 */ + unsigned int create:1; /* Validate property on creation */ + unsigned int import:1; /* Validate property on import */ } prop_flags_t; /* |