Patch 8.1.1463

12 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 4, 2019, 1:53:40 PM6/4/19
to vim...@googlegroups.com

Patch 8.1.1463
Problem: Gcc warns for uninitialized variable.
Solution: Put usage inside "if". (Ken Takata)
Files: src/textprop.c


*** ../vim-8.1.1462/src/textprop.c 2019-05-28 23:08:12.080648632 +0200
--- src/textprop.c 2019-06-04 19:14:23.975238456 +0200
***************
*** 1240,1248 ****
if (line == NULL)
return;
mch_memmove(line, newp, len);
! 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)
--- 1240,1251 ----
if (line == NULL)
return;
mch_memmove(line, newp, len);
! 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)
*** ../vim-8.1.1462/src/version.c 2019-06-04 08:22:49.889739641 +0200
--- src/version.c 2019-06-04 19:15:36.994561276 +0200
***************
*** 769,770 ****
--- 769,772 ----
{ /* Add new patch number below this line */
+ /**/
+ 1463,
/**/

--
From "know your smileys":
8-O "Omigod!!" (done "rm -rf *" ?)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages