From 49389e2695fcd84646e68d26855fed863003ba53 Mon Sep 17 00:00:00 2001 From: ligd Date: Wed, 3 Mar 2021 19:18:47 +0800 Subject: [PATCH] mm/net/sched: fix warnings Change-Id: I92db0e2cb7ff9e63eef8086a7cc084f67045d69c Signed-off-by: ligd --- mm/mm_heap/mm_checkcorruption.c | 4 +++- net/tcp/tcp_input.c | 4 ++++ sched/pthread/pthread_create.c | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mm/mm_heap/mm_checkcorruption.c b/mm/mm_heap/mm_checkcorruption.c index 6ad14aca402..5bafdbae0cb 100644 --- a/mm/mm_heap/mm_checkcorruption.c +++ b/mm/mm_heap/mm_checkcorruption.c @@ -25,7 +25,9 @@ #include #include +#include +#include #include #include @@ -79,7 +81,7 @@ void mm_checkcorruption(FAR struct mm_heap_s *heap) #if CONFIG_MM_REGIONS > 1 continue; #else - return 0; + return; #endif } diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c index f80ff17406b..330c21ca643 100644 --- a/net/tcp/tcp_input.c +++ b/net/tcp/tcp_input.c @@ -1152,11 +1152,15 @@ static void tcp_process_cache(FAR struct net_driver_s *dev, uint8_t domain, if (IFF_IS_IPv4(dev->d_flags)) { +#ifdef CONFIG_NET_IPv4 tcp_ipv4_select(dev); +#endif } else { +#ifdef CONFIG_NET_IPv6 tcp_ipv6_select(dev); +#endif } tcp_input(dev, domain, iplen, NULL); diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c index 6893c76a41e..46f036adfa2 100644 --- a/sched/pthread/pthread_create.c +++ b/sched/pthread/pthread_create.c @@ -26,6 +26,7 @@ #include #include +#include #include #include #include