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
Unknown Object (File)
Thu, Oct 31, 1:20 AM
Unknown Object (File)
Sun, Oct 20, 5:05 PM
Unknown Object (File)
Thu, Oct 17, 3:32 AM
Unknown Object (File)
Oct 2 2024, 9:06 PM
Unknown Object (File)
Sep 29 2024, 7:32 AM
Unknown Object (File)
Sep 29 2024, 5:32 AM
Unknown Object (File)
Sep 28 2024, 12:37 AM
Unknown Object (File)
Sep 27 2024, 6:25 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