]> granicus.if.org Git - vim/commitdiff
patch 8.1.0364: compiler warning in xdiff code v8.1.0364
authorBram Moolenaar <Bram@vim.org>
Mon, 10 Sep 2018 19:22:15 +0000 (21:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 10 Sep 2018 19:22:15 +0000 (21:22 +0200)
Problem:    Compiler warning in xdiff code. (Yegappan Lakshmanan)
Solution:   Initialize directly.

src/version.c
src/xdiff/README.txt
src/xdiff/xemit.c

index 853c86f58807cfb4407fe1e6833ba7c5e41e06c4..0654c299fa281e14418caf20ae9a965ade364060 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    364,
 /**/
     363,
 /**/
index f77893d37f2fa63b3f4d807eac0260498f467b63..1afe74095bf34fd4516fca5076316ee6da55352e 100644 (file)
@@ -11,4 +11,6 @@ And since it's part of git it is expected to be reliable.
 The code is distributed under the GNU LGPL license.  It is included in the
 COPYING file.
 
+Changes in these files were made to avoid compiler warnings.
+
 The first work for including xdiff in Vim was done by Christian Brabandt.
index 718b3ae90c92b8edc84647f5d2d40205b3c59af5..dfc1d51f8656619b5dc2da4a6872cafe00c8ca2f 100644 (file)
@@ -169,7 +169,9 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
        long s1, s2, e1, e2, lctx;
        xdchange_t *xch, *xche;
        long funclineprev = -1;
-       struct func_line func_line = { 0 };
+       struct func_line func_line;
+
+       func_line.len = 0;
 
        for (xch = xscr; xch; xch = xche->next) {
                xche = xdl_get_hunk(&xch, xecfg);