]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
geom: use bool for one-bit wide bit-field
authorEd Maste <emaste@FreeBSD.org>
Mon, 17 Apr 2023 18:56:51 +0000 (14:56 -0400)
committerEd Maste <emaste@FreeBSD.org>
Mon, 17 Apr 2023 19:43:00 +0000 (15:43 -0400)
commit00172f341666f2d5535ae6f4630c93593e86a4cb
treed19c0a18531437117779e9c67d3f625b6643b80a
parent653e8c11f43dc6448b8560eb1f6679de2c47e1ed
geom: use bool for one-bit wide bit-field

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, via dim
Reviewed by: dim
Sponsored by: The FreeBSD Foundation
sys/geom/part/g_part.h