mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
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:
committed by
Tony Hutter
parent
256b74d0b0
commit
572bd18c1f
+5
-5
@@ -258,10 +258,10 @@ extern int zpool_add(zpool_handle_t *, nvlist_t *);
|
||||
|
||||
typedef struct splitflags {
|
||||
/* do not split, but return the config that would be split off */
|
||||
int dryrun : 1;
|
||||
unsigned int dryrun : 1;
|
||||
|
||||
/* after splitting, import the pool */
|
||||
int import : 1;
|
||||
unsigned int import : 1;
|
||||
int name_flags;
|
||||
} splitflags_t;
|
||||
|
||||
@@ -650,13 +650,13 @@ extern int zfs_rollback(zfs_handle_t *, zfs_handle_t *, boolean_t);
|
||||
|
||||
typedef struct renameflags {
|
||||
/* recursive rename */
|
||||
int recursive : 1;
|
||||
unsigned int recursive : 1;
|
||||
|
||||
/* don't unmount file systems */
|
||||
int nounmount : 1;
|
||||
unsigned int nounmount : 1;
|
||||
|
||||
/* force unmount file systems */
|
||||
int forceunmount : 1;
|
||||
unsigned int forceunmount : 1;
|
||||
} renameflags_t;
|
||||
|
||||
extern int zfs_rename(zfs_handle_t *, const char *, renameflags_t);
|
||||
|
||||
Reference in New Issue
Block a user