Mercurial > vim
comparison src/screen.c @ 30331:ddbac2551dac v9.0.0501
patch 9.0.0501: warning for using uninitialized value in mouse test
Commit: https://github.com/vim/vim/commit/18ee0feb5dfbe51993dc715d24cf419ac92ebf92
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Sep 19 11:44:11 2022 +0100
patch 9.0.0501: warning for using uninitialized value in mouse test
Problem: Warning for using uninitialized value in mouse test.
Solution: Clear ScreenCols when allocating it. (Dominique Pell?)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 19 Sep 2022 12:45:04 +0200 |
parents | b871016ea7c1 |
children | ea15dfc9c155 |
comparison
equal
deleted
inserted
replaced
30330:4a9a699a2948 | 30331:ddbac2551dac |
---|---|
2706 (Rows + 1) * Columns); | 2706 (Rows + 1) * Columns); |
2707 } | 2707 } |
2708 if (enc_dbcs == DBCS_JPNU) | 2708 if (enc_dbcs == DBCS_JPNU) |
2709 new_ScreenLines2 = LALLOC_MULT(schar_T, (Rows + 1) * Columns); | 2709 new_ScreenLines2 = LALLOC_MULT(schar_T, (Rows + 1) * Columns); |
2710 new_ScreenAttrs = LALLOC_MULT(sattr_T, (Rows + 1) * Columns); | 2710 new_ScreenAttrs = LALLOC_MULT(sattr_T, (Rows + 1) * Columns); |
2711 new_ScreenCols = LALLOC_MULT(colnr_T, (Rows + 1) * Columns); | 2711 // Clear ScreenCols to avoid a warning for unitialized memory in |
2712 // jump_to_mouse(). | |
2713 new_ScreenCols = LALLOC_CLEAR_MULT(colnr_T, (Rows + 1) * Columns); | |
2712 new_LineOffset = LALLOC_MULT(unsigned, Rows); | 2714 new_LineOffset = LALLOC_MULT(unsigned, Rows); |
2713 new_LineWraps = LALLOC_MULT(char_u, Rows); | 2715 new_LineWraps = LALLOC_MULT(char_u, Rows); |
2714 new_TabPageIdxs = LALLOC_MULT(short, Columns); | 2716 new_TabPageIdxs = LALLOC_MULT(short, Columns); |
2715 #ifdef FEAT_PROP_POPUP | 2717 #ifdef FEAT_PROP_POPUP |
2716 new_popup_mask = LALLOC_MULT(short, Rows * Columns); | 2718 new_popup_mask = LALLOC_MULT(short, Rows * Columns); |