altos: Add -Wshadow to CFLAGS
authorKeith Packard <keithp@keithp.com>
Mon, 18 Feb 2019 18:42:23 +0000 (10:42 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 18 Feb 2019 21:08:23 +0000 (13:08 -0800)
And fix up the related messages.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_stdio.c
src/kernel/ao_task.c
src/lpc/Makefile-lpc.defs
src/stm/Makefile.defs
src/stmf0/Makefile-stmf0.defs

index c3b51d123ef1407702200798feaf17c6711c3e02..a42c97fbb2ecd085c87ce6b59ace4aaae788aa1c 100644 (file)
@@ -145,13 +145,13 @@ ao_echo(void)
 int8_t
 ao_add_stdio(int (*_pollchar)(void),
             void (*putchar)(char),
-            void (*flush)(void)) 
+            void (*_flush)(void)) 
 {
        if (ao_num_stdios == AO_NUM_STDIOS)
                ao_panic(AO_PANIC_STDIO);
        ao_stdios[ao_num_stdios]._pollchar = _pollchar;
        ao_stdios[ao_num_stdios].putchar = putchar;
-       ao_stdios[ao_num_stdios].flush = flush;
+       ao_stdios[ao_num_stdios].flush = _flush;
        ao_stdios[ao_num_stdios].echo = 1;
 #if AO_NUM_STDIOS > 1
        return ao_num_stdios++;
index dc5c19132caeb121a21b5bbe0698da713a68c9d8..0bc85d40aad2dc86c2df71ee884fb313733fbcb7 100644 (file)
@@ -67,7 +67,7 @@ static inline void ao_check_stack(void) {
 
 static struct ao_list  run_queue;
 static struct ao_list  alarm_queue;
-static struct ao_list  sleep_queue[SLEEP_HASH_SIZE];
+static struct ao_list  ao_sleep_queue[SLEEP_HASH_SIZE];
 
 static void
 ao_task_to_run_queue(struct ao_task *task)
@@ -80,7 +80,7 @@ ao_task_to_run_queue(struct ao_task *task)
 static struct ao_list *
 ao_task_sleep_queue(void *wchan)
 {
-       return &sleep_queue[(uintptr_t) wchan % SLEEP_HASH_SIZE];
+       return &ao_sleep_queue[(uintptr_t) wchan % SLEEP_HASH_SIZE];
 }
 
 static void
@@ -195,7 +195,7 @@ ao_task_init(void)
        ao_list_init(&alarm_queue);
        ao_task_alarm_tick = 0;
        for (i = 0; i < SLEEP_HASH_SIZE; i++)
-               ao_list_init(&sleep_queue[i]);
+               ao_list_init(&ao_sleep_queue[i]);
 }
 
 #if DEBUG
@@ -290,7 +290,7 @@ ao_task_validate(void)
 #endif /* HAS_TASK_QUEUE */
 
 void
-ao_add_task(struct ao_task * task, void (*start)(void), const char *name) 
+ao_add_task(struct ao_task * task, void (*task_func)(void), const char *name) 
 {
        uint8_t task_id;
        uint8_t t;
@@ -310,7 +310,7 @@ ao_add_task(struct ao_task * task, void (*start)(void), const char *name)
         * Construct a stack frame so that it will 'return'
         * to the start of the task
         */
-       ao_arch_init_stack(task, start);
+       ao_arch_init_stack(task, task_func);
        ao_arch_critical(
 #if HAS_TASK_QUEUE
                ao_task_init_queue(task);
index 493650e1d22b850dcadd6a45b65354e4d4cc1bb5..16da583f3d81dd4394a246a6819728da0c166501 100644 (file)
@@ -31,7 +31,8 @@ WARN_FLAGS=-Wall -Wextra -Werror -Wcast-align \
        -Wstrict-prototypes \
        -Wmissing-prototypes \
        -Wmissing-declarations \
-       -Wnested-externs
+       -Wnested-externs \
+       -Wshadow
 
 AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/kernel -I$(TOPDIR)/drivers \
        -DNEWLIB_INTEGER_PRINTF_SCANF \
index 7130965acfc9b431fb7a32e9b10be2789c1b9386..2db534c2c57d86ca963c2776134110e6a714d2e0 100644 (file)
@@ -29,7 +29,8 @@ WARN_FLAGS=-Wall -Wextra -Werror -Wcast-align \
        -Wstrict-prototypes \
        -Wmissing-prototypes \
        -Wmissing-declarations \
-       -Wnested-externs
+       -Wnested-externs \
+       -Wshadow
 
 AO_CFLAGS=-I. -I../stm -I../kernel -I../drivers -I../math -I../draw \
        -DNEWLIB_INTEGER_PRINTF_SCANF \
index 9372edc01552abd82d330a30d02fc112fb4c2ebe..0438fc7bf250dde2d77fa0920d3408d386ffc1f3 100644 (file)
@@ -30,7 +30,8 @@ WARN_FLAGS=-Wall -Wextra -Werror -Wcast-align \
        -Wstrict-prototypes \
        -Wmissing-prototypes \
        -Wmissing-declarations \
-       -Wnested-externs
+       -Wnested-externs \
+       -Wshadow
 
 AO_CFLAGS=-I. -I$(TOPDIR)/stmf0 -I$(TOPDIR)/kernel -I$(TOPDIR)/drivers \
        -DNEWLIB_INTEGER_PRINTF_SCANF \