patch 9.0.0838: compiler warnings for unused variables
Problem: Compiler warnings for unused variables.
Solution: Addjust #ifdef and remove unused variables. (John Marriott)
diff --git a/src/gui.c b/src/gui.c
index b245002..67b4d3e 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -64,7 +64,9 @@
gui_start(char_u *arg UNUSED)
{
char_u *old_term;
+#ifdef GUI_MAY_FORK
static int recursive = 0;
+#endif
#if defined(GUI_MAY_SPAWN) && defined(EXPERIMENTAL_GUI_CMD)
char *msg = NULL;
#endif
@@ -76,9 +78,8 @@
cursor_on(); // needed for ":gui" in .vimrc
full_screen = FALSE;
- ++recursive;
-
#ifdef GUI_MAY_FORK
+ ++recursive;
/*
* Quit the current process and continue in the child.
* Makes "gvim file" disconnect from the shell it was started in.
@@ -153,7 +154,9 @@
gui_mch_update();
apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED,
NULL, NULL, FALSE, curbuf);
+#ifdef GUI_MAY_FORK
--recursive;
+#endif
}
/*
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 8424c6c..9399c93 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -6190,13 +6190,11 @@
// handled here.
int i;
int wlen; // string length in words
- int clen; // string length in characters
int cells; // cell width of string up to composing char
int cw; // width of current cell
int c;
wlen = 0;
- clen = 0;
cells = 0;
for (i = 0; i < len; )
{
@@ -6236,7 +6234,6 @@
}
cells += cw;
i += utf_ptr2len_len(text + i, len - i);
- ++clen;
}
#if defined(FEAT_DIRECTX)
if (IS_ENABLE_DIRECTX())
diff --git a/src/os_win32.c b/src/os_win32.c
index fc6ea5e..b5ded95 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -4394,7 +4394,6 @@
int ret;
DWORD len;
DWORD toRead;
- int repeatCount;
// we query the pipe to see if there is any data to read
// to avoid to perform a blocking read
@@ -4405,11 +4404,9 @@
&availableBytes, // available bytes total
NULL); // byteLeft
- repeatCount = 0;
// We got real data in the pipe, read it
while (ret != 0 && availableBytes > 0)
{
- repeatCount++;
toRead = (DWORD)(BUFLEN - *buffer_off);
toRead = availableBytes < toRead ? availableBytes : toRead;
ReadFile(g_hChildStd_OUT_Rd, buffer + *buffer_off, toRead , &len, NULL);
diff --git a/src/version.c b/src/version.c
index 56ccb05..6aef2c1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 838,
+/**/
837,
/**/
836,