summaryrefslogtreecommitdiff
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-06 11:27:46 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-06 11:27:46 +0000
commita25f718431ae001242a6a8b74733ee7685ccf07d (patch)
tree3561e94c7f3f901ca0d71bc9c5071b543a199438 /src/gui.c
parentcd9c8d400c1eb9cbb4ff6a33be02f91a30ab13b2 (diff)
downloadvim-git-a25f718431ae001242a6a8b74733ee7685ccf07d.tar.gz
patch 9.0.0838: compiler warnings for unused variablesv9.0.0838
Problem: Compiler warnings for unused variables. Solution: Addjust #ifdef and remove unused variables. (John Marriott)
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui.c b/src/gui.c
index b245002da..67b4d3e12 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -64,7 +64,9 @@ static int disable_flush = 0; // If > 0, gui_mch_flush() is disabled.
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 @@ gui_start(char_u *arg UNUSED)
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_start(char_u *arg UNUSED)
gui_mch_update();
apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED,
NULL, NULL, FALSE, curbuf);
+#ifdef GUI_MAY_FORK
--recursive;
+#endif
}
/*