From 7ff42e9c83cdb17660a64901497704b38032af8c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 3 Jan 2012 19:15:07 +0000 Subject: sna/damage: Mark the box as packed so that the embedded_box is aligned correctly valgrind was complaining about an overlapping memcpy on a 64-bit platform as gcc padded the sna_damage_box to 28 bytes... Signed-off-by: Chris Wilson --- src/sna/sna_damage.c | 10 +++++----- src/sna/sna_damage.h | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/sna/sna_damage.c b/src/sna/sna_damage.c index 44677eda..7431f39e 100644 --- a/src/sna/sna_damage.c +++ b/src/sna/sna_damage.c @@ -48,6 +48,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * cheapy discard no-ops. */ +struct sna_damage_box { + struct list list; + int size; +} __attribute__((packed)); + static struct sna_damage *__freed_damage; static inline bool region_is_singular(RegionRec *r) @@ -182,11 +187,6 @@ static struct sna_damage *_sna_damage_create(void) return damage; } -struct sna_damage_box { - struct list list; - int size; -}; - static bool _sna_damage_create_boxes(struct sna_damage *damage, int count) { diff --git a/src/sna/sna_damage.h b/src/sna/sna_damage.h index 67c44c34..8e0c73cc 100644 --- a/src/sna/sna_damage.h +++ b/src/sna/sna_damage.h @@ -6,8 +6,6 @@ #include "compiler.h" -struct sna_damage_box; - struct sna_damage { BoxRec extents; pixman_region16_t region; -- cgit v1.2.3