Re: [PATCH] x86: sparse errors from string_32.h

From: Harvey Harrison
Date: Fri Feb 01 2008 - 06:08:47 EST


On Fri, 2008-02-01 at 11:56 +0100, Ingo Molnar wrote:
> * Harvey Harrison <harvey.harrison@xxxxxxxxx> wrote:
>
> > case 1:
> > - *(unsigned char *)s = pattern;
> > + *(unsigned char *)s = pattern & 0xff;
>
> i've applied your fix - but wouldnt it be cleaner to just cast the
> pattern variable to unsigned char instead?

I'm not sure, I went with this solution because of the explicit length
being tested in the case statements. The compiler can see it's all
constant at this point anyway...if you want a cast-patch instead, just
ask.

Harvey

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