Skip to content

Commit f18e8a9

Browse files
committed
patch 8.2.3289: compiler warning for unused variable with small features
Problem: Compiler warning for unused variable with small features. Solution: Rearrange #ifdefs.
1 parent 9dc4bef commit f18e8a9

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,8 @@ static char *(features[]) =
755755

756756
static int included_patches[] =
757757
{ /* Add new patch number below this line */
758+
/**/
759+
3289,
758760
/**/
759761
3288,
760762
/**/

src/window.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2484,7 +2484,9 @@ win_close(win_T *win, int free_buf)
24842484
#ifdef FEAT_DIFF
24852485
int had_diffmode = win->w_p_diff;
24862486
#endif
2487+
#ifdef MESSAGE_QUEUE
24872488
int did_decrement = FALSE;
2489+
#endif
24882490

24892491
#if defined(FEAT_TERMINAL) && defined(FEAT_PROP_POPUP)
24902492
// 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)
26652667
{
26662668
// Pass WEE_ALLOW_PARSE_MESSAGES to decrement dont_parse_messages
26672669
// before autocommands.
2668-
did_decrement = win_enter_ext(wp,
2670+
#ifdef MESSAGE_QUEUE
2671+
did_decrement =
2672+
#else
2673+
(void)
2674+
#endif
2675+
win_enter_ext(wp,
26692676
WEE_CURWIN_INVALID | WEE_TRIGGER_ENTER_AUTOCMDS
26702677
| WEE_TRIGGER_LEAVE_AUTOCMDS | WEE_ALLOW_PARSE_MESSAGES);
26712678
if (other_buffer)

0 commit comments

Comments
 (0)