From 168791e08ab2705f278333286f4e86be8b0540da Mon Sep 17 00:00:00 2001 From: Diogo Correia Date: Wed, 16 Aug 2023 16:24:17 +0100 Subject: [PATCH] winc1500: fix undefined declarations LOG_LEVEL > LOG_LEVEL_OFF guards were protecting a couple of function declarations. These functions were being used without taking this fact into consideration. These guards are now applied around the stack_stats() function only. Signed-off-by: Diogo Correia --- drivers/wifi/winc1500/wifi_winc1500.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/wifi/winc1500/wifi_winc1500.c b/drivers/wifi/winc1500/wifi_winc1500.c index 26488293628..758e776bf7c 100644 --- a/drivers/wifi/winc1500/wifi_winc1500.c +++ b/drivers/wifi/winc1500/wifi_winc1500.c @@ -158,11 +158,11 @@ struct winc1500_data { static struct winc1500_data w1500_data; #if LOG_LEVEL > LOG_LEVEL_OFF - static void stack_stats(void) { log_stack_usage(&winc1500_thread_data); } +#endif /* LOG_LEVEL > LOG_LEVEL_OFF */ static char *socket_error_string(int8_t err) { @@ -285,8 +285,6 @@ static char *socket_message_to_string(uint8_t message) } } -#endif /* LOG_LEVEL > LOG_LEVEL_OFF */ - /** * This function is called when the socket is to be opened. */ @@ -773,8 +771,9 @@ static void winc1500_wifi_cb(uint8_t message_type, void *pvMsg) default: break; } - +#if LOG_LEVEL > LOG_LEVEL_OFF stack_stats(); +#endif /* LOG_LEVEL > LOG_LEVEL_OFF */ } static void handle_socket_msg_connect(struct socket_data *sd, void *pvMsg) @@ -962,8 +961,9 @@ static void winc1500_socket_cb(SOCKET sock, uint8 message, void *pvMsg) break; } - +#if LOG_LEVEL > LOG_LEVEL_OFF stack_stats(); +#endif /* LOG_LEVEL > LOG_LEVEL_OFF */ } static void winc1500_thread(void)