Add -Wuninitialized -Wunused -Wcast-align to warnings checked by kitchen_sink (and fixup warnings) (#125)

This commit is contained in:
Graham Sanderson
2021-02-15 10:06:12 -06:00
committed by graham sanderson
parent a59fd524d5
commit 6f94f6a3d7
15 changed files with 32 additions and 31 deletions

View File

@ -83,6 +83,8 @@ int core1_wrapper(int (*entry)(void), void *stack_base) {
#if PICO_USE_STACK_GUARDS
// install core1 stack guard
runtime_install_stack_guard(stack_base);
#else
__unused void *ignore = stack_base;
#endif
irq_init_priorities();
return (*entry)();
@ -126,7 +128,7 @@ void multicore_launch_core1_with_stack(void (*entry)(void), uint32_t *stack_bott
}
void multicore_launch_core1(void (*entry)(void)) {
extern char __StackOneBottom;
extern uint32_t __StackOneBottom;
uint32_t *stack_limit = (uint32_t *) &__StackOneBottom;
// hack to reference core1_stack although that pointer is wrong.... core1_stack should always be <= stack_limit, if not boom!
uint32_t *stack = core1_stack <= stack_limit ? stack_limit : (uint32_t *) -1;