[U-Boot] [PATCHv2] dlmalloc.c: Fix gcc alias warning

Wolfgang Denk wd at denx.de
Mon Oct 18 22:44:43 CEST 2010


Dear Joakim Tjernlund,

In message <1287039094-13282-1-git-send-email-Joakim.Tjernlund at transmode.se> you wrote:
> Fix these warnings:
> dlmalloc.c: In function 'free':
> dlmalloc.c:2507: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
> dlmalloc.c:2507: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
> dlmalloc.c:2507: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
> 
> Some page(http://blog.worldofcoding.com/2010/02/solving-gcc-44-strict-aliasing-problems.html)
> suggests adding __attribute__((__may_alias__)). Doing so makes the warnings go away.
> 
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> ---
>  - forgot signoff
>  - removed stray attribute change
> 
>  common/dlmalloc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Until you walk a mile in another man's moccasins, you  can't  imagine
the smell.


More information about the U-Boot mailing list