patch 8.1.1032: warnings from clang static analyzer
Problem: Warnings from clang static analyzer. (Yegappan Lakshmanan)
Solution: Fix relevant warnings.
diff --git a/src/screen.c b/src/screen.c
index 111c77d..c01a74c 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4900,7 +4900,7 @@
else
{
char_u *p;
- int len = n_extra;
+ int len;
int i;
int saved_nextra = n_extra;
@@ -5505,8 +5505,8 @@
if (vcol < v + col - win_col_off(wp))
vcol = v + col - win_col_off(wp);
#ifdef FEAT_CONCEAL
- /* Get rid of the boguscols now, we want to draw until the right
- * edge for 'cursorcolumn'. */
+ // Get rid of the boguscols now, we want to draw until the right
+ // edge for 'cursorcolumn'.
col -= boguscols;
boguscols = 0;
#endif
@@ -10466,7 +10466,6 @@
attr = attr_nosel;
tabcount = 0;
- scol = 0;
for (tp = first_tabpage; tp != NULL && col < Columns - 4;
tp = tp->tp_next)
{
@@ -10799,7 +10798,7 @@
int o;
int this_ru_col;
int off = 0;
- int width = Columns;
+ int width;
/* If 'ruler' off or redrawing disabled, don't do anything */
if (!p_ru)