From a18cee52d953196ce12550df2ac5a14fbf359802 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Tue, 7 Apr 2015 18:38:42 -0700 Subject: Ensure alignment of Res_png_9patch. This doesn't alter the alignment of the data within the struct, but enforces that this structure will be appropriately aligned when used. The image_info struct has this struct preceded by a bool, which causes odd alignment for the members of this struct. Change-Id: Ia2ef5c81b2f961c0f61858a10a7821d82f600919 --- include/androidfw/ResourceTypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/androidfw/ResourceTypes.h b/include/androidfw/ResourceTypes.h index 8673219..0822afd 100644 --- a/include/androidfw/ResourceTypes.h +++ b/include/androidfw/ResourceTypes.h @@ -112,7 +112,7 @@ struct __assertChar16Size { * * The PNG chunk type is "npTc". */ -struct Res_png_9patch +struct alignas(uintptr_t) Res_png_9patch { Res_png_9patch() : wasDeserialized(false), xDivsOffset(0), yDivsOffset(0), colorsOffset(0) { } -- cgit v1.1