changeset 16924:2f39b35f7290 v8.1.1463

patch 8.1.1463: gcc warns for uninitialized variable commit https://github.com/vim/vim/commit/277e79adc4d2b62556ce8a3720684e4b3e1e6d42 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 4 19:16:29 2019 +0200 patch 8.1.1463: gcc warns for uninitialized variable Problem: Gcc warns for uninitialized variable. Solution: Put usage inside "if". (Ken Takata)
author Bram Moolenaar <Bram@vim.org>
date Tue, 04 Jun 2019 19:30:05 +0200
parents f6b9a192e111
children fe06c620ee5c
files src/textprop.c src/version.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1240,9 +1240,12 @@ join_prop_lines(
     if (line == NULL)
 	return;
     mch_memmove(line, newp, len);
-    l = oldproplen * sizeof(textprop_T);
-    mch_memmove(line + len, props, l);
-    len += l;
+    if (oldproplen > 0)
+    {
+	l = oldproplen * sizeof(textprop_T);
+	mch_memmove(line + len, props, l);
+	len += l;
+    }
 
     for (i = 0; i < count - 1; ++i)
 	if (prop_lines[i] != NULL)
--- a/src/version.c
+++ b/src/version.c
@@ -768,6 +768,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1463,
+/**/
     1462,
 /**/
     1461,