comparison src/drawline.c @ 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 69693a62f2f4
children 6387e75a4a6b
comparison
equal deleted inserted replaced
29466:d5b1a7cece0a 29467:5b3819ce0865
1484 text_prop_combine = FALSE; 1484 text_prop_combine = FALSE;
1485 text_prop_type = NULL; 1485 text_prop_type = NULL;
1486 text_prop_id = 0; 1486 text_prop_id = 0;
1487 if (text_props_active > 0) 1487 if (text_props_active > 0)
1488 { 1488 {
1489 int used_tpi; 1489 int used_tpi = -1;
1490 int used_attr = 0; 1490 int used_attr = 0;
1491 1491
1492 // Sort the properties on priority and/or starting last. 1492 // Sort the properties on priority and/or starting last.
1493 // Then combine the attributes, highest priority last. 1493 // Then combine the attributes, highest priority last.
1494 current_text_props = text_props; 1494 current_text_props = text_props;
1512 text_prop_combine = pt->pt_flags & PT_FLAG_COMBINE; 1512 text_prop_combine = pt->pt_flags & PT_FLAG_COMBINE;
1513 text_prop_id = text_props[tpi].tp_id; 1513 text_prop_id = text_props[tpi].tp_id;
1514 used_tpi = tpi; 1514 used_tpi = tpi;
1515 } 1515 }
1516 } 1516 }
1517 if (n_extra == 0 && text_prop_id < 0 1517 if (n_extra == 0 && text_prop_id < 0 && used_tpi >= 0
1518 && -text_prop_id 1518 && -text_prop_id
1519 <= wp->w_buffer->b_textprop_text.ga_len) 1519 <= wp->w_buffer->b_textprop_text.ga_len)
1520 { 1520 {
1521 char_u *p = ((char_u **)wp->w_buffer 1521 char_u *p = ((char_u **)wp->w_buffer
1522 ->b_textprop_text.ga_data)[ 1522 ->b_textprop_text.ga_data)[