From: Bram Moolenaar Date: Wed, 6 Nov 2019 22:26:20 +0000 (+0100) Subject: patch 8.1.2267: compiler warning for uninitialized variable X-Git-Tag: v8.1.2267 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b991527e8167f25ad1dfe780b9633c153600955;p=vim patch 8.1.2267: compiler warning for uninitialized variable Problem: Compiler warning for uninitialized variable. (Tony Mechelynck) Solution: Rearrange the code. --- diff --git a/src/buffer.c b/src/buffer.c index d190bdfab..f7ff01ff9 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3087,11 +3087,12 @@ buflist_list(exarg_T *eap) qsort(buflist.ga_data, (size_t)buflist.ga_len, sizeof(buf_T *), buf_compare); - p = buflist_data = (buf_T **)buflist.ga_data; - buf = *p; + buflist_data = (buf_T **)buflist.ga_data; + buf = *buflist_data; } + p = buflist_data; - for (; buf != NULL && !got_int; buf = buflist_data + for (; buf != NULL && !got_int; buf = buflist_data != NULL ? (++p < buflist_data + buflist.ga_len ? *p : NULL) : buf->b_next) #else diff --git a/src/version.c b/src/version.c index 9bb1436c0..3cc98798c 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2267, /**/ 2266, /**/