From da48d912e4041e453cf254ce07462dc45a329058 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 2 Apr 2020 13:32:13 +0900 Subject: [PATCH] gethostbyaddr_r: Fix an unsed variable warning --- libs/libc/netdb/lib_gethostbyaddrr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/libc/netdb/lib_gethostbyaddrr.c b/libs/libc/netdb/lib_gethostbyaddrr.c index 062f8b74af..aeb8251644 100644 --- a/libs/libc/netdb/lib_gethostbyaddrr.c +++ b/libs/libc/netdb/lib_gethostbyaddrr.c @@ -384,7 +384,9 @@ int gethostbyaddr_r(FAR const void *addr, socklen_t len, int type, size_t buflen, FAR struct hostent **result, FAR int *h_errnop) { +#if defined(CONFIG_NET_LOOPBACK) || defined(CONFIG_NETDB_HOSTFILE) struct hostent_s tmp; +#endif int ret; DEBUGASSERT(addr != NULL && host != NULL && buf != NULL);