HomeFreeBSD

Use bool for one-bit wide bit-fields

Description

Use bool for one-bit wide bit-fields

A signed one-bit wide bit-field can take only the values 0 and -1. Clang
16 introduced a warning that "implicit truncation from 'int' to a
one-bit wide bit-field changes value from 1 to -1". Fix the warnings by
using C99 bool.

Reported by: Clang 16
Reviewed by: emaste, jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39705

(cherry picked from commit bab8274c090942cf96c44bc001307b9bffac9d7e)

Details

Provenance
dimAuthored on Apr 25 2023, 5:18 PM
Reviewer
emaste
Differential Revision
D39705: use bool for one-bit wide bit-fields
Parents
rG286ed9ef4f9f: powerpc: fix a few pmap related functions to return correct types
Branches
Unknown
Tags
Unknown