Skip to content

Commit bdb8139

Browse files
committed
patch 8.0.1351: warning for unused variables building with MinGW
Problem: Warning for unused variables building with MinGW. Solution: Change a few #ifdefs (suggested by John Marriott). Remove superfluous checks of FEAT_MBYTE.
1 parent 1355aad commit bdb8139

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

src/gui_w32.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,11 @@ static void TrackUserActivity(UINT uMsg);
498498
*
499499
* These LOGFONT used for IME.
500500
*/
501-
#ifdef FEAT_MBYTE
501+
#if defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)
502502
/* holds LOGFONT for 'guifontwide' if available, otherwise 'guifont' */
503503
static LOGFONT norm_logfont;
504+
#endif
505+
#ifdef FEAT_MBYTE_IME
504506
/* holds LOGFONT for 'guifont' always. */
505507
static LOGFONT sub_logfont;
506508
#endif
@@ -3361,6 +3363,8 @@ gui_mch_init_font(char_u *font_name, int fontset UNUSED)
33613363
font_name = (char_u *)lf.lfFaceName;
33623364
#if defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)
33633365
norm_logfont = lf;
3366+
#endif
3367+
#ifdef FEAT_MBYTE_IME
33643368
sub_logfont = lf;
33653369
#endif
33663370
#ifdef FEAT_MBYTE_IME
@@ -5794,15 +5798,15 @@ gui_mch_set_sp_color(guicolor_T color)
57945798
gui.currSpColor = color;
57955799
}
57965800

5797-
#if defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)
5801+
#ifdef FEAT_MBYTE_IME
57985802
/*
57995803
* Multi-byte handling, originally by Sung-Hoon Baek.
58005804
* First static functions (no prototypes generated).
58015805
*/
5802-
#ifdef _MSC_VER
5803-
# include <ime.h> /* Apparently not needed for Cygwin, MingW or Borland. */
5804-
#endif
5805-
#include <imm.h>
5806+
# ifdef _MSC_VER
5807+
# include <ime.h> /* Apparently not needed for Cygwin, MingW or Borland. */
5808+
# endif
5809+
# include <imm.h>
58065810

58075811
/*
58085812
* handle WM_IME_NOTIFY message
@@ -5954,7 +5958,7 @@ GetResultStr(HWND hwnd, int GCS, int *lenp)
59545958
#endif
59555959

59565960
/* For global functions we need prototypes. */
5957-
#if (defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)) || defined(PROTO)
5961+
#if defined(FEAT_MBYTE_IME) || defined(PROTO)
59585962

59595963
/*
59605964
* set font to IM.
@@ -6079,7 +6083,7 @@ im_get_status(void)
60796083
return status;
60806084
}
60816085

6082-
#endif /* FEAT_MBYTE && FEAT_MBYTE_IME */
6086+
#endif /* FEAT_MBYTE_IME */
60836087

60846088
#if defined(FEAT_MBYTE) && !defined(FEAT_MBYTE_IME) && defined(GLOBAL_IME)
60856089
/* Win32 with GLOBAL IME */

src/version.c

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

772772
static int included_patches[] =
773773
{ /* Add new patch number below this line */
774+
/**/
775+
1351,
774776
/**/
775777
1350,
776778
/**/

0 commit comments

Comments
 (0)