aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-10-21 21:33:49 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-10-21 23:24:40 +0200
commite0f6f46c1b7ab486a84f2cfb8cda3e62035594aa (patch)
treedb3ba6a0d820a655f2b4428f9332b68cd0c186c7
parent863dbbb3d4a6d248ccd33092c17dcded2f194006 (diff)
downloadrneovim-e0f6f46c1b7ab486a84f2cfb8cda3e62035594aa.tar.gz
rneovim-e0f6f46c1b7ab486a84f2cfb8cda3e62035594aa.tar.bz2
rneovim-e0f6f46c1b7ab486a84f2cfb8cda3e62035594aa.zip
fix warning: garbage/uninitialized value
According to clang scan-build, `fromcol` could be uninitialized at line 2645. Found by clang scan-build 5.0
-rw-r--r--src/nvim/screen.c10
1 files 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;