]> granicus.if.org Git - vim/commitdiff
patch 8.2.0837: compiler warning for value set but not used v8.2.0837
authorBram Moolenaar <Bram@vim.org>
Fri, 29 May 2020 19:38:42 +0000 (21:38 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 29 May 2020 19:38:42 +0000 (21:38 +0200)
Problem:    Compiler warning for value set but not used.
Solution:   Move variable inside #ifdef.

src/channel.c
src/version.c

index 2b85ec91da6d6e1d68b601091fa687db7f812473..6f182c15d16b4e5c7740c019c7a79edff14c2c72 100644 (file)
@@ -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));
index a88e478ac8e9e4d9b9da0740e634ee25572e2f72..a963bdc86847edd2c75697fd705b7754f23aa2af 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    837,
 /**/
     836,
 /**/