From 01dff1fbfb7aa8afea3ac60da25d47e073c63005 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 12 Oct 2020 23:04:53 -0400 Subject: vim-patch:8.2.0957: compiler warning for uninitialized variable Problem: Compiler warning for uninitialized variable. (Tony Mechelynck) Solution: Initialize one variable. https://github.com/vim/vim/commit/2d4070d3b02e775a6f3d5ef52265add270e09a4f --- src/nvim/spell.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/spell.c b/src/nvim/spell.c index f036d7fe04..1984a357c3 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -396,8 +396,7 @@ size_t spell_check( mi.mi_word = ptr; mi.mi_fend = ptr; if (spell_iswordp(mi.mi_fend, wp)) { - int prev_upper; - int this_upper; + bool this_upper = false; // init for gcc if (use_camel_case) { c = PTR2CHAR(mi.mi_fend); @@ -407,7 +406,7 @@ size_t spell_check( do { MB_PTR_ADV(mi.mi_fend); if (use_camel_case) { - prev_upper = this_upper; + const bool prev_upper = this_upper; c = PTR2CHAR(mi.mi_fend); this_upper = SPELL_ISUPPER(c); camel_case = !prev_upper && this_upper; -- cgit