[PATCH 0/3] catch non-sign-extended '~' brainos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris, fellow sparsers,

Bitwise-not is often used to create masks. Unfortunately implicit conversions
to longer types may leave the recipient with fewer set bit than he expected,
if he started with an unsigned type. It's nice to warn that such constructs
are dubious.

The guts for the fix are in patch 2. I'm not sure this is the right location
for the fix, but the prior logical-not checks are quite closely related, so
I bundled them in together.

As an aside - while sniffing around that file, I came across a lot of helpers
who could have their pointer parameters made const - is there any interest in
some const clean-up, or is that unwanted comma-fudging?

Cheers,
Phil

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux