summaryrefslogtreecommitdiff
path: root/src/channel.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-05-29 21:38:42 +0200
committerBram Moolenaar <Bram@vim.org>2020-05-29 21:38:42 +0200
commitb60db8ba149b26024e6d871e8634d7fea639252a (patch)
tree3a57b234c20dd7ff7f93cc53a1298727e4232268 /src/channel.c
parent14798ab9a5ee4b94f6c12f1986207569356acfc8 (diff)
downloadvim-git-b60db8ba149b26024e6d871e8634d7fea639252a.tar.gz
patch 8.2.0837: compiler warning for value set but not usedv8.2.0837
Problem: Compiler warning for value set but not used. Solution: Move variable inside #ifdef.
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/channel.c b/src/channel.c
index 2b85ec91d..6f182c15d 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -999,10 +999,9 @@ channel_open(
for (addr = res; addr != NULL; addr = addr->ai_next)
{
const char *dst = hostname;
- const void *src = NULL;
# ifdef HAVE_INET_NTOP
+ const void *src = NULL;
char buf[NUMBUFLEN];
-# endif
if (addr->ai_family == AF_INET6)
{
@@ -1018,7 +1017,6 @@ channel_open(
sai->sin_port = htons(port);
src = &sai->sin_addr;
}
-# ifdef HAVE_INET_NTOP
if (src != NULL)
{
dst = inet_ntop(addr->ai_family, src, buf, sizeof(buf));