Page MenuHomeFreeBSD

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

Authored by dim on Apr 18 2023, 6:09 PM.
Tags
None
Referenced Files
F132436053: D39665.id120692.diff
Thu, Oct 16, 10:32 PM
Unknown Object (File)
Mon, Oct 13, 10:10 PM
Unknown Object (File)
Fri, Oct 10, 8:25 PM
Unknown Object (File)
Fri, Oct 10, 8:21 PM
Unknown Object (File)
Fri, Oct 10, 8:20 PM
Unknown Object (File)
Fri, Oct 10, 2:50 PM
Unknown Object (File)
Wed, Oct 8, 5:25 PM
Unknown Object (File)
Wed, Sep 24, 9:10 PM
Subscribers

Details

Summary

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
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable