HomeFreeBSD

ichiic: use bool for one-bit wide bit-fields

Description

ichiic: use bool for one-bit wide bit-fields

A 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 by using c99 bool.

Reported by: Clang
Reviewed by: emaste, wulf
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D39665

(cherry picked from commit 87f55ab0b46ad72efee11d1b64ec8f839bb013da)

Details

Provenance
dimAuthored on Apr 18 2023, 6:08 PM
Reviewer
emaste
Differential Revision
D39665: ichiic: use bool for one-bit wide bit-fields
Parents
rG5cc19c2f6c68: bsnmp: make single bit bitfields unsigned to avoid clang 16 warning
Branches
Unknown
Tags
Unknown