[U-Boot] [PATCH 3/4] USB: Fix anti-aliasing complaints in OHCI-HCD

Marek Vasut marek.vasut at gmail.com
Sat Aug 20 20:56:41 CEST 2011


On Saturday, August 20, 2011 08:07:49 PM Mike Frysinger wrote:
> On Saturday, August 20, 2011 09:28:43 Marek Vasut wrote:
> > -	__u32 datab[4];
> > +	__u8 datab[16] __attribute__((aligned(4)));
> > 
> >  	__u8 *data_buf = (__u8 *)datab;
> 
> leverage a union to avoid attributes:
> union {
> 	__u32 u32[4];
> 	__u8 u8[16];
> } datab;
> __u8 *data_buf = datab.u8;
> 
> also, it isn't "anti-aliasing complaints", it's "fix strict aliasing
> violations".  "anti-aliasing" is something completely different in the
> computing world :p.

Well I guess my brain just saw the compiler output differently ... thanks for the 
catch.

> -mike


More information about the U-Boot mailing list