From 18ee0feb5dfbe51993dc715d24cf419ac92ebf92 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 19 Sep 2022 11:44:11 +0100 Subject: [PATCH] patch 9.0.0501: warning for using uninitialized value in mouse test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Problem: Warning for using uninitialized value in mouse test. Solution: Clear ScreenCols when allocating it. (Dominique Pellé) --- src/screen.c | 4 +++- src/version.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index 27f484837..06bda0d63 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2708,7 +2708,9 @@ retry: if (enc_dbcs == DBCS_JPNU) new_ScreenLines2 = LALLOC_MULT(schar_T, (Rows + 1) * Columns); new_ScreenAttrs = LALLOC_MULT(sattr_T, (Rows + 1) * Columns); - new_ScreenCols = LALLOC_MULT(colnr_T, (Rows + 1) * Columns); + // Clear ScreenCols to avoid a warning for unitialized memory in + // jump_to_mouse(). + new_ScreenCols = LALLOC_CLEAR_MULT(colnr_T, (Rows + 1) * Columns); new_LineOffset = LALLOC_MULT(unsigned, Rows); new_LineWraps = LALLOC_MULT(char_u, Rows); new_TabPageIdxs = LALLOC_MULT(short, Columns); diff --git a/src/version.c b/src/version.c index a167c3846..46e7099d1 100644 --- a/src/version.c +++ b/src/version.c @@ -699,6 +699,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 501, /**/ 500, /**/ -- 2.50.1