patch 8.0.1753: various warnings from a static analyser
Problem: Various warnings from a static analyser
Solution: Add type casts, remove unneeded conditions. (Christian Brabandt,
closes #2770)
diff --git a/src/getchar.c b/src/getchar.c
index 285d5d5..623440e 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -4119,7 +4119,7 @@
mapblock_T *mp;
int hash;
# ifdef FEAT_LOCALMAP
- int expand_buffer = FALSE;
+ int exp_buffer = FALSE;
validate_maphash();
@@ -4134,14 +4134,14 @@
if (hash > 0) /* there is only one abbr list */
break;
#ifdef FEAT_LOCALMAP
- if (expand_buffer)
+ if (exp_buffer)
mp = curbuf->b_first_abbr;
else
#endif
mp = first_abbr;
}
# ifdef FEAT_LOCALMAP
- else if (expand_buffer)
+ else if (exp_buffer)
mp = curbuf->b_maphash[hash];
# endif
else
@@ -4154,9 +4154,9 @@
}
}
# ifdef FEAT_LOCALMAP
- if (expand_buffer)
+ if (exp_buffer)
break;
- expand_buffer = TRUE;
+ exp_buffer = TRUE;
}
# endif