[warnings] remove some redundant declarations

Discovered with -Wredundant-decls
This commit is contained in:
Travis Geiselbrecht
2024-04-18 23:49:25 -07:00
parent f92aae9dcf
commit 6ed6f36fa0
8 changed files with 3 additions and 11 deletions

View File

@@ -189,7 +189,6 @@ void arm_cm_irq_entry(void);
void arm_cm_irq_exit(bool reschedule);
/* built in exception vectors */
void _start(void);
void _nmi(void);
void _hardfault(void);
void _memmanage(void);

View File

@@ -15,7 +15,6 @@ extern unsigned int __data_start_rom, __data_start, __data_end;
extern unsigned int __bss_start, __bss_end;
/* entry point of the binary */
void _start(void);
void _start(void) {
/* copy data from rom */
if (&__data_start != &__data_start_rom) {

View File

@@ -25,8 +25,6 @@ struct context_switch_frame {
vaddr_t lr;
};
extern void arm_context_switch(addr_t *old_sp, addr_t new_sp);
static void initial_thread_func(void) __NO_RETURN;
static void initial_thread_func(void) {
int ret;

View File

@@ -34,8 +34,6 @@ struct context_switch_frame {
vaddr_t r29;
};
extern void arm64_context_switch(addr_t *old_sp, addr_t new_sp);
static void initial_thread_func(void) __NO_RETURN;
static void initial_thread_func(void) {
int ret;

View File

@@ -37,7 +37,6 @@ status_t platform_set_oneshot_timer (platform_timer_callback callback, void *arg
// convert interval to ticks
uint64_t ticks = riscv_get_time() + ((interval * ARCH_RISCV_MTIME_RATE) / 1000u);
#if RISCV_M_MODE
extern void clint_set_timer(uint64_t ticks);
clint_set_timer(ticks);
#elif RISCV_S_MODE
sbi_set_timer(ticks);

View File

@@ -83,7 +83,7 @@ endif
# flags that are sometimes nice to enable to catch problems but too strict to have on all the time.
# add to global flags from time to time to find things, otherwise only available with a module
# option (see make/module.mk re: MODULE_OPTIONS).
EXTRA_MODULE_COMPILEFLAGS := -Wmissing-declarations
EXTRA_MODULE_COMPILEFLAGS := -Wmissing-declarations -Wredundant-decls
EXTRA_MODULE_CFLAGS := -Wmissing-prototypes
EXTRA_MODULE_CPPFLAGS :=
EXTRA_MODULE_ASMFLAGS :=
@@ -91,6 +91,7 @@ EXTRA_MODULE_ASMFLAGS :=
#GLOBAL_COMPILEFLAGS += -Wpacked
#GLOBAL_COMPILEFLAGS += -Wpadded
#GLOBAL_COMPILEFLAGS += -Winline
#GLOBAL_COMPILEFLAGS += -Wredundant-decls
# if WERROR is set, add to the compile args
ifeq (true,$(call TOBOOL,$(WERROR)))

View File

@@ -204,7 +204,7 @@ HAL_StatusTypeDef HAL_NAND_GetECC(NAND_HandleTypeDef *hnand, uint32_t *ECCval,
*/
/* NAND State functions *******************************************************/
HAL_NAND_StateTypeDef HAL_NAND_GetState(NAND_HandleTypeDef *hnand);
uint32_t HAL_NAND_Read_Status(NAND_HandleTypeDef *hnand);
//uint32_t HAL_NAND_Read_Status(NAND_HandleTypeDef *hnand);
/**
* @}
*/

View File

@@ -87,8 +87,6 @@ static inline status_t tcp_accept(tcp_socket_t *listen_socket, tcp_socket_t **ac
/* utilities */
void gen_random_mac_address(uint8_t *mac_addr);
uint32_t minip_parse_ipaddr(const char *addr, size_t len);
uint32_t minip_parse_ipaddr(const char *addr, size_t len);
void printip(uint32_t x);
void printip_named(const char *s, u32 x);