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
F135571573: D39665.diff
Mon, Nov 10, 10:42 PM
Unknown Object (File)
Sun, Nov 9, 10:45 PM
Unknown Object (File)
Tue, Nov 4, 10:36 PM
Unknown Object (File)
Sat, Nov 1, 10:20 PM
Unknown Object (File)
Fri, Oct 31, 3:20 AM
Unknown Object (File)
Thu, Oct 30, 10:04 PM
Unknown Object (File)
Thu, Oct 30, 9:47 PM
Unknown Object (File)
Tue, Oct 28, 4:22 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