]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.0838: compiler warnings for unused variables v9.0.0838
authorBram Moolenaar <Bram@vim.org>
Sun, 6 Nov 2022 11:27:46 +0000 (11:27 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 6 Nov 2022 11:27:46 +0000 (11:27 +0000)
Problem:    Compiler warnings for unused variables.
Solution:   Addjust #ifdef and remove unused variables. (John Marriott)

src/gui.c
src/gui_w32.c
src/os_win32.c
src/version.c

index b245002da18ba700c7b120e029bc95e9a036ad28..67b4d3e12a2592861aa99175edb20d37b7d9ee68 100644 (file)
--- 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
 }
 
 /*
index 8424c6cefd6f1aa1dd29845ca2954b2b4079ef97..9399c930ec51e6adfca9e2fabe32ea4af1e8a18e 100644 (file)
@@ -6190,13 +6190,11 @@ gui_mch_draw_string(
        // 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 @@ gui_mch_draw_string(
            }
            cells += cw;
            i += utf_ptr2len_len(text + i, len - i);
-           ++clen;
        }
 #if defined(FEAT_DIRECTX)
        if (IS_ENABLE_DIRECTX())
index fc6ea5ea3ba07ecb2ba28473aef9fc72d36f1648..b5ded95d597fc61cbe8b7b28483cd81cf77cbb94 100644 (file)
@@ -4394,7 +4394,6 @@ dump_pipe(int         options,
     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 @@ dump_pipe(int        options,
                        &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);
index 56ccb053a267667bd4937a8c2385337e5c10bea0..6aef2c131961e2ff1038b219fc92107681f4a5f4 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    838,
 /**/
     837,
 /**/