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
@ -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…
Reference in New Issue
Block a user