From 9c85c9d60334edc2af65a47124873e94e0ff1e9c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 10 Jan 2017 14:47:03 -0800 Subject: [PATCH] altos/lisp: Add casts to keep the latest GCC from whinging Something about alignment issues. Signed-off-by: Keith Packard --- src/lisp/ao_lisp_mem.c | 8 ++++---- src/lisp/ao_lisp_save.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lisp/ao_lisp_mem.c b/src/lisp/ao_lisp_mem.c index 5bf6e1e4..d067ea07 100644 --- a/src/lisp/ao_lisp_mem.c +++ b/src/lisp/ao_lisp_mem.c @@ -169,15 +169,15 @@ static const struct ao_lisp_root ao_lisp_root[] = { }, { .type = NULL, - .addr = (void **) &save_poly[0] + .addr = (void **) (void *) &save_poly[0] }, { .type = NULL, - .addr = (void **) &save_poly[1] + .addr = (void **) (void *) &save_poly[1] }, { .type = NULL, - .addr = (void **) &save_poly[2] + .addr = (void **) (void *) &save_poly[2] }, { .type = &ao_lisp_atom_type, @@ -197,7 +197,7 @@ static const struct ao_lisp_root ao_lisp_root[] = { }, { .type = NULL, - .addr = (void **) &ao_lisp_v, + .addr = (void **) (void *) &ao_lisp_v, }, { .type = &ao_lisp_cons_type, diff --git a/src/lisp/ao_lisp_save.c b/src/lisp/ao_lisp_save.c index e6e8b65e..4f850fb9 100644 --- a/src/lisp/ao_lisp_save.c +++ b/src/lisp/ao_lisp_save.c @@ -21,7 +21,7 @@ ao_lisp_save(struct ao_lisp_cons *cons) return AO_LISP_NIL; #ifdef AO_LISP_SAVE - struct ao_lisp_os_save *os = (struct ao_lisp_os_save *) &ao_lisp_pool[AO_LISP_POOL]; + struct ao_lisp_os_save *os = (struct ao_lisp_os_save *) (void *) &ao_lisp_pool[AO_LISP_POOL]; ao_lisp_collect(AO_LISP_COLLECT_FULL); os->atoms = ao_lisp_atom_poly(ao_lisp_atoms); @@ -43,7 +43,7 @@ ao_lisp_restore(struct ao_lisp_cons *cons) #ifdef AO_LISP_SAVE struct ao_lisp_os_save save; - struct ao_lisp_os_save *os = (struct ao_lisp_os_save *) &ao_lisp_pool[AO_LISP_POOL]; + struct ao_lisp_os_save *os = (struct ao_lisp_os_save *) (void *) &ao_lisp_pool[AO_LISP_POOL]; if (!ao_lisp_os_restore_save(&save, AO_LISP_POOL)) return ao_lisp_error(AO_LISP_INVALID, "header restore failed"); -- 2.30.2