mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
dlmalloc.c: Fix gcc alias warning
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@transmode.se>
Acked-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
d1e0b10acc
commit
1ba91ba233
1 changed files with 1 additions and 1 deletions
|
|
@ -1152,7 +1152,7 @@ struct malloc_chunk
|
|||
INTERNAL_SIZE_T size; /* Size in bytes, including overhead. */
|
||||
struct malloc_chunk* fd; /* double links -- used only if free. */
|
||||
struct malloc_chunk* bk;
|
||||
};
|
||||
} __attribute__((__may_alias__)) ;
|
||||
|
||||
typedef struct malloc_chunk* mchunkptr;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue