From e0f6f46c1b7ab486a84f2cfb8cda3e62035594aa Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 21 Oct 2018 21:33:49 +0200 Subject: [PATCH] fix warning: garbage/uninitialized value According to clang scan-build, `fromcol` could be uninitialized at line 2645. Found by clang scan-build 5.0 --- src/nvim/screen.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/nvim/screen.c b/src/nvim/screen.c index f6d162aec2..5033a6dd7f 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2175,11 +2175,11 @@ win_line ( int n_skip = 0; /* nr of chars to skip for 'nowrap' */ - int fromcol, tocol; /* start/end of inverting */ - int fromcol_prev = -2; /* start of inverting after cursor */ - int noinvcur = FALSE; /* don't invert the cursor */ - pos_T *top, *bot; - int lnum_in_visual_area = FALSE; + int fromcol = 0, tocol = 0; // start/end of inverting + int fromcol_prev = -2; // start of inverting after cursor + int noinvcur = false; // don't invert the cursor + pos_T *top, *bot; + int lnum_in_visual_area = false; pos_T pos; long v;