From b1eec77be764d905ccb8cf331564a61f64ba6615 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Wed, 22 Apr 2020 10:39:46 +0800 Subject: [PATCH] igmp/mld6: Fix build warnings when !ESP_LWIP_IGMP/MLD6_TIMERS_ONDEMAND Fix below build warnings: warning: 'igmp_timeout_cb' defined but not used [-Wunused-function] warning: 'mld6_timeout_cb' defined but not used [-Wunused-function] Signed-off-by: Axel Lin --- src/core/ipv4/igmp.c | 2 ++ src/core/ipv6/mld6.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/core/ipv4/igmp.c b/src/core/ipv4/igmp.c index e7ec9392..859e027b 100644 --- a/src/core/ipv4/igmp.c +++ b/src/core/ipv4/igmp.c @@ -639,6 +639,7 @@ igmp_leavegroup_netif(struct netif *netif, const ip4_addr_t *groupaddr) } } +#if ESP_LWIP_IGMP_TIMERS_ONDEMAND /** * Wrapper function with matching prototype which calls the actual callback */ @@ -648,6 +649,7 @@ static void igmp_timeout_cb(void *arg) igmp_tmr(); } +#endif /** * The igmp timer function (both for NO_SYS=1 and =0) * Should be called every IGMP_TMR_INTERVAL milliseconds (100 ms is default). diff --git a/src/core/ipv6/mld6.c b/src/core/ipv6/mld6.c index c4336487..9be6103a 100644 --- a/src/core/ipv6/mld6.c +++ b/src/core/ipv6/mld6.c @@ -490,6 +490,7 @@ mld6_leavegroup_netif(struct netif *netif, const ip6_addr_t *groupaddr) return ERR_VAL; } +#if ESP_LWIP_MLD6_TIMERS_ONDEMAND /** * Wrapper function with matching prototype which calls the actual callback */ @@ -499,6 +500,7 @@ static void mld6_timeout_cb(void *arg) mld6_tmr(); } +#endif /** * Periodic timer for mld processing. Must be called every