To: vim_dev@googlegroups.com Subject: Patch 8.1.2267 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///