Re: [PATCH V2] sparse: Allow override of sizeof(bool) warning

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

 



On Thu, 2014-02-27 at 12:26 -0800, H. Peter Anvin wrote:
> On February 27, 2014 12:22:45 PM PST, Christopher Li <sparse@xxxxxxxxxxx> wrote:
> >OK. I get it nobody wants a sizeof(_Bool) warning.
> >I am going to apply this patch.

Please use V3 as I stuffed up the alphabetic order
of sizeof and shadow.

> >Should we change the default to off then?
> I would.

I'm not sure it matters much, but the linux-kernel
Makefile wouldn't need to be changed if Wsizeof_bool
is default 0.

Here's a couple of other nits:

Maybe the evaluate.c "size = bits_in_char;" assignment

        if (size == 1 && is_bool_type(type)) {
-               warning(expr->pos, "expression using sizeof bool");
+               if (Wsizeof_bool)
+                       warning(expr->pos, "expression using sizeof bool");
                size = bits_in_char;
        }

should be

	size = sizeof(_Bool) * 8;

And also, in sparse.1, Josh Triplett is shown as
the maintainer.  Maybe that should be changed to
Christopher Li


--
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