Re: kernel/workqueue.c:4435:61: sparse: expression using sizeof bool

From: Fengguang Wu
Date: Fri Jun 07 2013 - 19:50:14 EST


On Fri, Jun 07, 2013 at 03:03:51PM -0700, Tejun Heo wrote:
> On Fri, Jun 07, 2013 at 02:15:21PM -0700, Andrew Morton wrote:
> > > 4434 /* copy worker description */
> > > > 4435 probe_kernel_read(&desc_valid, &worker->desc_valid, sizeof(desc_valid));
> >
> > I don't understand the rationale for the sparse test, really. This
> > code seems unproblematic.
>
> Yeah, I've gotten that warning a couple times now and am just ignoring
> it at this point. Maybe the standard says bool isn't a proper
> integeral type and its size isn't precisely defined or something? I
> don't know.

Hmm, I'd better disable the warnings that are normally ignored anyway..

Thanks,
Fengguang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/