• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisionf609865bfc54c2d4600a8e36ef28ad8184176856 (tree)
Time2019-11-07 07:30:03
AuthorBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Log Message

patch 8.1.2267: compiler warning for uninitialized variable

Commit: https://github.com/vim/vim/commit/3b991527e8167f25ad1dfe780b9633c153600955
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Nov 6 23:26:20 2019 +0100

patch 8.1.2267: compiler warning for uninitialized variable
Problem: Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution: Rearrange the code.

Change Summary

Incremental Difference

diff -r 3bb39398b093 -r f609865bfc54 src/buffer.c
--- a/src/buffer.c Wed Nov 06 21:15:04 2019 +0100
+++ b/src/buffer.c Wed Nov 06 23:30:03 2019 +0100
@@ -3087,11 +3087,12 @@
30873087 qsort(buflist.ga_data, (size_t)buflist.ga_len,
30883088 sizeof(buf_T *), buf_compare);
30893089
3090- p = buflist_data = (buf_T **)buflist.ga_data;
3091- buf = *p;
3090+ buflist_data = (buf_T **)buflist.ga_data;
3091+ buf = *buflist_data;
30923092 }
3093-
3094- for (; buf != NULL && !got_int; buf = buflist_data
3093+ p = buflist_data;
3094+
3095+ for (; buf != NULL && !got_int; buf = buflist_data != NULL
30953096 ? (++p < buflist_data + buflist.ga_len ? *p : NULL)
30963097 : buf->b_next)
30973098 #else
diff -r 3bb39398b093 -r f609865bfc54 src/version.c
--- a/src/version.c Wed Nov 06 21:15:04 2019 +0100
+++ b/src/version.c Wed Nov 06 23:30:03 2019 +0100
@@ -742,6 +742,8 @@
742742 static int included_patches[] =
743743 { /* Add new patch number below this line */
744744 /**/
745+ 2267,
746+/**/
745747 2266,
746748 /**/
747749 2265,
Show on old repository browser