Skip to content

Commit

Permalink
patch 8.2.3289: compiler warning for unused variable with small features
Browse files Browse the repository at this point in the history
Problem:    Compiler warning for unused variable with small features.
Solution:   Rearrange #ifdefs.
  • Loading branch information
brammool committed Aug 4, 2021
1 parent 9dc4bef commit f18e8a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3289,
/**/
3288,
/**/
Expand Down
9 changes: 8 additions & 1 deletion src/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f18e8a9

Please sign in to comment.