Skip to content

Commit edce742

Browse files
committed
patch 8.1.0787: compiler warning for unused function
Problem: Compiler warning for unused function. (Tony Mechelynck) Solution: Tune #ifdef around setjmp functions.
1 parent 1077230 commit edce742

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

src/os_unix.c

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,11 @@ sig_alarm SIGDEFARG(sigarg)
980980
}
981981
#endif
982982

983-
#if defined(HAVE_SETJMP_H) || defined(PROTO)
983+
#if (defined(HAVE_SETJMP_H) \
984+
&& ((defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)) \
985+
|| defined(FEAT_LIBCALL))) \
986+
|| defined(PROTO)
987+
984988
// argument to SETJMP()
985989
static JMP_BUF lc_jump_env;
986990

@@ -7490,9 +7494,9 @@ setup_term_clip(void)
74907494
if (app_context != NULL && xterm_Shell == (Widget)0)
74917495
{
74927496
int (*oldhandler)();
7493-
#if defined(HAVE_SETJMP_H)
7497+
# if defined(HAVE_SETJMP_H)
74947498
int (*oldIOhandler)();
7495-
#endif
7499+
# endif
74967500
# ifdef ELAPSED_FUNC
74977501
elapsed_T start_tv;
74987502

@@ -7503,7 +7507,7 @@ setup_term_clip(void)
75037507
/* Ignore X errors while opening the display */
75047508
oldhandler = XSetErrorHandler(x_error_check);
75057509

7506-
#if defined(HAVE_SETJMP_H)
7510+
# if defined(HAVE_SETJMP_H)
75077511
/* Ignore X IO errors while opening the display */
75087512
oldIOhandler = XSetIOErrorHandler(x_IOerror_check);
75097513
mch_startjmp();
@@ -7513,21 +7517,21 @@ setup_term_clip(void)
75137517
xterm_dpy = NULL;
75147518
}
75157519
else
7516-
#endif
7520+
# endif
75177521
{
75187522
xterm_dpy = XtOpenDisplay(app_context, xterm_display,
75197523
"vim_xterm", "Vim_xterm", NULL, 0, &z, &strp);
75207524
if (xterm_dpy != NULL)
75217525
xterm_dpy_retry_count = 0;
7522-
#if defined(HAVE_SETJMP_H)
7526+
# if defined(HAVE_SETJMP_H)
75237527
mch_endjmp();
7524-
#endif
7528+
# endif
75257529
}
75267530

7527-
#if defined(HAVE_SETJMP_H)
7531+
# if defined(HAVE_SETJMP_H)
75287532
/* Now handle X IO errors normally. */
75297533
(void)XSetIOErrorHandler(oldIOhandler);
7530-
#endif
7534+
# endif
75317535
/* Now handle X errors normally. */
75327536
(void)XSetErrorHandler(oldhandler);
75337537

src/version.c

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

792792
static int included_patches[] =
793793
{ /* Add new patch number below this line */
794+
/**/
795+
787,
794796
/**/
795797
786,
796798
/**/

0 commit comments

Comments
 (0)