# HG changeset patch # User Bram Moolenaar # Date 1651362304 -7200 # Node ID 8fc86c943863e9d4b35dbaeb03085b9f13424c92 # Parent 94f2550a1af148fc93fe67574b8c9f4032820ca9 patch 8.2.4851: compiler warning for uninitialized variable Commit: https://github.com/vim/vim/commit/b4011afe53ce2d065e49718b8c5b9974b7022f92 Author: Bram Moolenaar Date: Sun May 1 00:42:24 2022 +0100 patch 8.2.4851: compiler warning for uninitialized variable Problem: Compiler warning for uninitialized variable. Solution: Use another variable to decide to restore option values. diff --git a/src/session.c b/src/session.c --- a/src/session.c +++ b/src/session.c @@ -620,6 +620,7 @@ makeopens( int only_save_windows = TRUE; int nr; int restore_size = TRUE; + int restore_height_width = FALSE; win_T *wp; char_u *sname; win_T *edited_win = NULL; @@ -887,6 +888,7 @@ makeopens( || put_line(fd, "set winminwidth=0") == FAIL || put_line(fd, "set winwidth=1") == FAIL) goto fail; + restore_height_width = TRUE; } if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL) goto fail; @@ -979,7 +981,7 @@ makeopens( goto fail; } - if (tab_firstwin->w_next != NULL) + if (restore_height_width) { // Restore 'winminheight' and 'winminwidth'. if (put_line(fd, "let &winminheight = s:save_winminheight") == FAIL diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4851, +/**/ 4850, /**/ 4849,