Patch 8.1.2267

14 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 6, 2019, 5:27:53 PM11/6/19
to vim...@googlegroups.com

Patch 8.1.2267
Problem: Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution: Rearrange the code.
Files: src/buffer.c


*** ../vim-8.1.2266/src/buffer.c 2019-11-02 22:54:37.397188845 +0100
--- src/buffer.c 2019-11-06 23:25:19.230126822 +0100
***************
*** 3087,3097 ****
qsort(buflist.ga_data, (size_t)buflist.ga_len,
sizeof(buf_T *), buf_compare);

! p = buflist_data = (buf_T **)buflist.ga_data;
! buf = *p;
}

! for (; buf != NULL && !got_int; buf = buflist_data
? (++p < buflist_data + buflist.ga_len ? *p : NULL)
: buf->b_next)
#else
--- 3087,3098 ----
qsort(buflist.ga_data, (size_t)buflist.ga_len,
sizeof(buf_T *), buf_compare);

! buflist_data = (buf_T **)buflist.ga_data;
! buf = *buflist_data;
}
+ p = buflist_data;

! for (; buf != NULL && !got_int; buf = buflist_data != NULL
? (++p < buflist_data + buflist.ga_len ? *p : NULL)
: buf->b_next)
#else
*** ../vim-8.1.2266/src/version.c 2019-11-06 21:09:13.672099289 +0100
--- src/version.c 2019-11-06 23:26:08.253944409 +0100
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 2267,
/**/

--
Those who live by the sword get shot by those who don't.

/// 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