altos/lpc: Add (void *) cast to fix alignment warning
authorKeith Packard <keithp@keithp.com>
Fri, 21 Apr 2017 23:40:58 +0000 (16:40 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 21 Apr 2017 23:40:58 +0000 (16:40 -0700)
The -Wcast-align warning is generated when this cast is not present.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/lpc/ao_arch_funcs.h

index 5fc0f680fa070923558f847ef477c0b70ee8e0cc..15106dea42d620b1bbc452c9e56b6eaea2c6bc36 100644 (file)
@@ -109,7 +109,7 @@ ao_arch_memory_barrier() {
 static inline void
 ao_arch_init_stack(struct ao_task *task, void *start)
 {
-       uint32_t        *sp = (uint32_t *) (task->stack + AO_STACK_SIZE);
+       uint32_t        *sp = (uint32_t *) (void *) (task->stack + AO_STACK_SIZE);
        uint32_t        a = (uint32_t) start;
        int             i;