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 <mahrens@delphix.com>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Brooks Davis <brooks.davis@sri.com>
Closes #14125
This commit is contained in:
Brooks Davis
2022-11-01 20:43:32 +00:00
committed by Tony Hutter
parent 256b74d0b0
commit 572bd18c1f
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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;
/*