summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-09-10 21:22:15 +0200
committerBram Moolenaar <Bram@vim.org>2018-09-10 21:22:15 +0200
commite797abf3c75358ebc0b31d6e076972daf889e06e (patch)
treef3269db6995b119142514da7314b8ea1f344c7ba
parentc93262b2e3fb043c685bd4014a35a29111dea484 (diff)
downloadvim-git-e797abf3c75358ebc0b31d6e076972daf889e06e.tar.gz
patch 8.1.0364: compiler warning in xdiff codev8.1.0364
Problem: Compiler warning in xdiff code. (Yegappan Lakshmanan) Solution: Initialize directly.
-rw-r--r--src/version.c2
-rw-r--r--src/xdiff/README.txt2
-rw-r--r--src/xdiff/xemit.c4
3 files changed, 7 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c
index 853c86f58..0654c299f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 364,
+/**/
363,
/**/
362,
diff --git a/src/xdiff/README.txt b/src/xdiff/README.txt
index f77893d37..1afe74095 100644
--- a/src/xdiff/README.txt
+++ b/src/xdiff/README.txt
@@ -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.
diff --git a/src/xdiff/xemit.c b/src/xdiff/xemit.c
index 718b3ae90..dfc1d51f8 100644
--- a/src/xdiff/xemit.c
+++ b/src/xdiff/xemit.c
@@ -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);