Mercurial > vim
changeset 29467:5b3819ce0865 v9.0.0075
patch 9.0.0075: some compilers warn for using an uninitialized variable
Commit: https://github.com/vim/vim/commit/be3dbda871ffd1b61f52b9519c23772f62381c67
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 26 11:42:34 2022 +0100
patch 9.0.0075: some compilers warn for using an uninitialized variable
Problem: Some compilers warn for using an uninitialized variable. (Tony
Mechelynck)
Solution: Initialize the variable.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 26 Jul 2022 12:45:03 +0200 |
parents | d5b1a7cece0a |
children | 55f974b6776d |
files | src/drawline.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/drawline.c +++ b/src/drawline.c @@ -1486,7 +1486,7 @@ win_line( text_prop_id = 0; if (text_props_active > 0) { - int used_tpi; + int used_tpi = -1; int used_attr = 0; // Sort the properties on priority and/or starting last. @@ -1514,7 +1514,7 @@ win_line( used_tpi = tpi; } } - if (n_extra == 0 && text_prop_id < 0 + if (n_extra == 0 && text_prop_id < 0 && used_tpi >= 0 && -text_prop_id <= wp->w_buffer->b_textprop_text.ga_len) {