From: Wolfgang Denk Date: Mon, 18 Oct 2010 22:44:43 +0200 Subject: [U-Boot] [PATCHv2] dlmalloc.c: Fix gcc alias warning In-Reply-To: <1287039094-13282-1-git-send-email-Joakim.Tjernlund@transmode.se> References: <1287038480-11338-1-git-send-email-Joakim.Tjernlund@transmode.se> <1287039094-13282-1-git-send-email-Joakim.Tjernlund@transmode.se> Message-ID: <20101018204443.64A37136320@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Joakim Tjernlund, In message <1287039094-13282-1-git-send-email-Joakim.Tjernlund@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 > --- > - 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.