You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/04/02 05:38:30 UTC

[incubator-nuttx] branch master updated: gethostbyaddr_r: Fix an unsed variable warning

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new da48d91  gethostbyaddr_r: Fix an unsed variable warning
da48d91 is described below

commit da48d912e4041e453cf254ce07462dc45a329058
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Apr 2 13:32:13 2020 +0900

    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 062f8b7..aeb8251 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);