summaryrefslogtreecommitdiff
path: root/src/beval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-04 14:50:32 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-04 14:50:32 +0200
commit8d4ed11da635a1abe0ef2d795b4d48824c54d0e7 (patch)
tree2e6e32cb89174e28967a9cd9a9408c99c884a609 /src/beval.c
parentcde0ff39da2459b16007fef701ebaa449fb6fe9d (diff)
downloadvim-git-8d4ed11da635a1abe0ef2d795b4d48824c54d0e7.tar.gz
patch 8.2.0510: Coverity complains about using uninitialized variablev8.2.0510
Problem: Coverity complains about using uninitialized variable. Solution: Assign a value to "scol". Move code inside NULL check.
Diffstat (limited to 'src/beval.c')
-rw-r--r--src/beval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/beval.c b/src/beval.c
index 63aaf1376..6b10a654d 100644
--- a/src/beval.c
+++ b/src/beval.c
@@ -110,6 +110,8 @@ find_word_under_cursor(
lbuf = vim_strnsave(lbuf, len);
}
}
+ else
+ scol = col;
if (winp != NULL)
*winp = wp;