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
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 3 2022, 5:16 PM
Parents
rGf47f6a055d0c: Address warnings about possible division by zero from clangsa
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGabb42dc5e1d5: Make 1-bit bitfields unsigned (authored by brooks).Nov 3 2022, 5:16 PM