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/term.c b/src/term.c
index 3a27fa6..1739f5b 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2361,7 +2361,7 @@
return 0;
}
-#ifdef FEAT_GUI
+#if defined(FEAT_GUI) || defined(PROTO)
int
term_is_gui(char_u *name)
{
@@ -2823,7 +2823,7 @@
winpos_x = prev_winpos_x;
winpos_y = prev_winpos_y;
- if (timeout < 10 && prev_winpos_y >= 0 && prev_winpos_y >= 0)
+ if (timeout < 10 && prev_winpos_y >= 0 && prev_winpos_x >= 0)
{
/* Polling: return previous values if we have them. */
*x = winpos_x;