From 8cc3adee5aabd3b6ad1c6c897c9c31a8136e61cc Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 30 Oct 2017 16:50:38 +0000 Subject: Duktape: Attempt to squash aarch64 cast increases required alignment warnings. content/handlers/javascript/duktape/duktape.c: In function 'duk_resolve_nonbound_function': content/handlers/javascript/duktape/duktape.c:14585:25: error: cast increases required alignment of target type [-Werror=cast-align] duk_push_tval(thr, &((duk_hboundfunc *) h)->target); ^ content/handlers/javascript/duktape/duktape.c: In function 'duk_bi_function_prototype_bind': content/handlers/javascript/duktape/duktape.c:32399:20: error: cast increases required alignment of target type [-Werror=cast-align] h_boundtarget = (duk_hboundfunc *) h_target; ^ content/handlers/javascript/duktape/duktape.c: In function 'duk_free_hobject': content/handlers/javascript/duktape/duktape.c:46048:23: error: cast increases required alignment of target type [-Werror=cast-align] duk_hboundfunc *f = (duk_hboundfunc *) h; ^ content/handlers/javascript/duktape/duktape.c: In function 'duk__mark_hobject': content/handlers/javascript/duktape/duktape.c:47865:23: error: cast increases required alignment of target type [-Werror=cast-align] duk_hboundfunc *f = (duk_hboundfunc *) h; ^ content/handlers/javascript/duktape/duktape.c: In function 'duk_hobject_refcount_finalize_norz': content/handlers/javascript/duktape/duktape.c:49842:23: error: cast increases required alignment of target type [-Werror=cast-align] duk_hboundfunc *f = (duk_hboundfunc *) h; ^ content/handlers/javascript/duktape/duktape.c: In function 'duk__handle_bound_chain_for_call': content/handlers/javascript/duktape/duktape.c:61509:14: error: cast increases required alignment of target type [-Werror=cast-align] h_bound = (duk_hboundfunc *) func; ^ content/handlers/javascript/duktape/duktape.c: In function 'duk_js_instanceof': content/handlers/javascript/duktape/duktape.c:78117:24: error: cast increases required alignment of target type [-Werror=cast-align] duk_push_tval(thr, &((duk_hboundfunc *) func)->target); ^ --- content/handlers/javascript/duktape/duktape.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'content') diff --git a/content/handlers/javascript/duktape/duktape.c b/content/handlers/javascript/duktape/duktape.c index 3139b6998..5e3b467f9 100644 --- a/content/handlers/javascript/duktape/duktape.c +++ b/content/handlers/javascript/duktape/duktape.c @@ -6663,7 +6663,11 @@ struct duk_hobject { duk_uint32_t h_size; /* hash part size or 0 if unused */ #endif #endif -}; +} +#if (DUK_USE_ALIGN_BY == 8) +__attribute__ ((aligned (8))) +#endif +; /* * Exposed data -- cgit v1.2.3