From 5209666539bcd4dea30faaf39f700339e075d14d Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Thu, 16 Nov 2023 21:40:56 +0200 Subject: [PATCH] net: mdns: Fix compile error when using clang No issues with gcc but clang gives this error for the *v4 variable few lines below. .../lib/dns/mdns_responder.c:712:2: error: expected expression struct net_context *v4; Signed-off-by: Jukka Rissanen --- subsys/net/lib/dns/mdns_responder.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subsys/net/lib/dns/mdns_responder.c b/subsys/net/lib/dns/mdns_responder.c index 5a724faf136..04acbabbecd 100644 --- a/subsys/net/lib/dns/mdns_responder.c +++ b/subsys/net/lib/dns/mdns_responder.c @@ -706,6 +706,9 @@ static int init_listener(void) } } ipv6_out: + ; /* Added ";" to avoid clang compile error because of + * the "struct net_context *v4" after it. + */ #endif /* CONFIG_NET_IPV6 */ #if defined(CONFIG_NET_IPV4)