Re: [U-Boot] [PATCH 1/9] usb: Fix strict-aliasing warning in host/ohci-hcd.c

2012-01-08 Thread Simon Glass
Hi Mike, On Sun, Jan 8, 2012 at 1:32 AM, Mike Frysinger wrote: > On Thursday 05 January 2012 22:54:49 Simon Glass wrote: >>       len = min_t(int, len, leni); >> -     if (data != databuf.ptr) >> -             memcpy(data, databuf.ptr, len); >> +     if (dataptr) >> +             memcpy(data, dat

Re: [U-Boot] [PATCH 1/9] usb: Fix strict-aliasing warning in host/ohci-hcd.c

2012-01-08 Thread Mike Frysinger
On Thursday 05 January 2012 22:54:49 Simon Glass wrote: > len = min_t(int, len, leni); > - if (data != databuf.ptr) > - memcpy(data, databuf.ptr, len); > + if (dataptr) > + memcpy(data, dataptr, len); > + else > + memcpy(data, &databuf, len); t

[U-Boot] [PATCH 1/9] usb: Fix strict-aliasing warning in host/ohci-hcd.c

2012-01-05 Thread Simon Glass
This fixes these warnings seen with my gcc 4.6 compiler. ohci-hcd.c: In function 'submit_control_msg': ohci-hcd.c:1307: warning: dereferencing pointer 'pretmp.729' does break strict-aliasing rules cc1: note: initialized from here ohci-hcd.c:1310: warning: dereferencing pointer 'pretmp.729' does b