[alsa-devel] [PATCH 2/4] ASoC: codecs: msm8916: fix invalid cast to bool type

Mark Brown broonie at kernel.org
Sun May 14 11:59:45 CEST 2017


On Tue, May 02, 2017 at 10:33:01PM +0900, Takashi Sakamoto wrote:

> This commit fixes this bug by using unsigned int type, instead of bool.
> This bug is detected by sparse:

> smsm8916-wcd-analog.c:809:43: warning: odd constant _Bool cast (40 becomes 1)
> smsm8916-wcd-analog.c:814:43: warning: odd constant _Bool cast (40 becomes 1)

This looks like a bug in sparse - the use of integers in a boolean
context is totally valid and especially the fact that it is claiming
there is a cast when clearly there is no cast is an obvious red flag, at
the very least the message it reports is bogus.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20170514/1af2c0be/attachment.sig>


More information about the Alsa-devel mailing list