From 8a6d7cefc9bf45b979ff064d87141949e9b81ca4 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sun, 29 Oct 2017 12:44:20 -0400 Subject: tlsf: pack info structs This should make it build cleanly under -Wcast-align, which should hopefully avoid any alignment issues on ARM. Change-Id: Ie147323d2d8cb980dcbb94710387b7ee80826c4d --- lib/tlsf/src/tlsf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/tlsf/src/tlsf.c') diff --git a/lib/tlsf/src/tlsf.c b/lib/tlsf/src/tlsf.c index 136c4152c0..d9d5a7b921 100644 --- a/lib/tlsf/src/tlsf.c +++ b/lib/tlsf/src/tlsf.c @@ -194,7 +194,7 @@ typedef struct bhdr_struct { struct free_ptr_struct free_ptr; u8_t buffer[1]; /*sizeof(struct free_ptr_struct)]; */ } ptr; -} bhdr_t; +} __attribute__((packed)) bhdr_t; /* This structure is embedded at the beginning of each area, giving us * enough information to cope with a set of areas */ @@ -202,7 +202,7 @@ typedef struct bhdr_struct { typedef struct area_info_struct { bhdr_t *end; struct area_info_struct *next; -} area_info_t; +} __attribute__((packed)) area_info_t; typedef struct TLSF_struct { /* the TLSF's structure signature */ -- cgit v1.2.3