]> granicus.if.org Git - vim/commitdiff
patch 8.2.3289: compiler warning for unused variable with small features v8.2.3289
authorBram Moolenaar <Bram@vim.org>
Wed, 4 Aug 2021 19:16:50 +0000 (21:16 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 4 Aug 2021 19:16:50 +0000 (21:16 +0200)
Problem:    Compiler warning for unused variable with small features.
Solution:   Rearrange #ifdefs.

src/version.c
src/window.c

index b878054039d313455dd6147d38dc38284faab0af..a473ca552fd698fbbfb4211cc4b4bbd5059daed4 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3289,
 /**/
     3288,
 /**/
index 5f9d5fe130c257f9b788d29f3f46a596e2a1e139..7dcb8ed5bd2176ae9264c40df3d37bc540bbf304 100644 (file)
@@ -2484,7 +2484,9 @@ win_close(win_T *win, int free_buf)
 #ifdef FEAT_DIFF
     int                had_diffmode = win->w_p_diff;
 #endif
+#ifdef MESSAGE_QUEUE
     int                did_decrement = FALSE;
+#endif
 
 #if defined(FEAT_TERMINAL) && defined(FEAT_PROP_POPUP)
     // Can close a popup window with a terminal if the job has finished.
@@ -2665,7 +2667,12 @@ win_close(win_T *win, int free_buf)
     {
        // Pass WEE_ALLOW_PARSE_MESSAGES to decrement dont_parse_messages
        // before autocommands.
-       did_decrement = win_enter_ext(wp,
+#ifdef MESSAGE_QUEUE
+       did_decrement =
+#else
+       (void)
+#endif
+           win_enter_ext(wp,
                WEE_CURWIN_INVALID | WEE_TRIGGER_ENTER_AUTOCMDS
                      | WEE_TRIGGER_LEAVE_AUTOCMDS | WEE_ALLOW_PARSE_MESSAGES);
        if (other_buffer)