Mercurial > vim
changeset 20567:5e86e00fa712 v8.2.0837
patch 8.2.0837: compiler warning for value set but not used
Commit: https://github.com/vim/vim/commit/b60db8ba149b26024e6d871e8634d7fea639252a
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 29 21:38:42 2020 +0200
patch 8.2.0837: compiler warning for value set but not used
Problem: Compiler warning for value set but not used.
Solution: Move variable inside #ifdef.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 29 May 2020 21:45:03 +0200 |
parents | 37ba6d4a9455 |
children | 7ac8b2b4e1b4 |
files | src/channel.c src/version.c |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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; +# ifdef HAVE_INET_NTOP const void *src = NULL; -# ifdef HAVE_INET_NTOP 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));