HomeFreeBSD

Make 1-bit bitfields unsigned

Description

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

Details

Provenance
brooksAuthored on Nov 1 2022, 8:43 PM
Tony Hutter <hutter2@llnl.gov>Committed on Dec 1 2022, 8:39 PM
Parents
rG256b74d0b034: Address warnings about possible division by zero from clangsa
Branches
Unknown
Tags
Unknown

Event Timeline