Mercurial > vim
changeset 25988:9b2be5556740 v8.2.3527
patch 8.2.3527: gcc complains about uninitialized variable
Commit: https://github.com/vim/vim/commit/9d4b8caf9eddb2db09395587c621309f4513befa
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 17 11:33:47 2021 +0100
patch 8.2.3527: gcc complains about uninitialized variable
Problem: Gcc complains about uninitialized variable. (Tony Mechelynck)
Solution: Initialize it.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 17 Oct 2021 12:45:03 +0200 |
parents | 7e64e5351c4d |
children | b2a27d7a9427 |
files | src/gui_gtk_x11.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -5605,7 +5605,7 @@ gui_gtk2_draw_string(int row, int col, c int byte_sum; // byte position in string char_u *cs; // current *s pointer int needs_pango; // look ahead, 0=ascii 1=unicode/ligatures - int should_need_pango; + int should_need_pango = FALSE; int slen; int is_ligature; int next_is_ligature; @@ -5743,6 +5743,7 @@ gui_gtk2_draw_string(int row, int col, c slen++; // ascii } } + // temporarily zero terminate substring, print, restore char, wrap backup_ch = *(cs + slen); *(cs + slen) = 0;