]> granicus.if.org Git - vim/commitdiff
patch 8.1.1747: compiler warning for unused variables v8.1.1747
authorBram Moolenaar <Bram@vim.org>
Thu, 25 Jul 2019 18:53:03 +0000 (20:53 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 25 Jul 2019 18:53:03 +0000 (20:53 +0200)
Problem:    Compiler warning for unused variables. (Tony Mechelynck)
Solution:   Add #ifdef.

src/screen.c
src/version.c

index 01d57407877c9bc2cf19e08cc301fe33e9c82d9c..a8850bf402184f330884b0e13d2d4b7f91a52c8f 100644 (file)
@@ -1091,8 +1091,7 @@ win_update(win_T *wp)
     int                scrolled_down = FALSE;  /* TRUE when scrolled down when
                                           w_topline got smaller a bit */
 #ifdef FEAT_SEARCH_EXTRA
-    matchitem_T *cur;          /* points to the match list */
-    int                top_to_mod = FALSE;    /* redraw above mod_top */
+    int                top_to_mod = FALSE;    // redraw above mod_top
 #endif
 
     int                row;            /* current window row to display */
@@ -1222,18 +1221,18 @@ win_update(win_T *wp)
                mod_bot = buf->b_mod_bot;
 
 #ifdef FEAT_SEARCH_EXTRA
-           /* When 'hlsearch' is on and using a multi-line search pattern, a
-            * change in one line may make the Search highlighting in a
-            * previous line invalid.  Simple solution: redraw all visible
-            * lines above the change.
-            * Same for a match pattern.
-            */
+           // When 'hlsearch' is on and using a multi-line search pattern, a
+           // change in one line may make the Search highlighting in a
+           // previous line invalid.  Simple solution: redraw all visible
+           // lines above the change.
+           // Same for a match pattern.
            if (search_hl.rm.regprog != NULL
                                        && re_multiline(search_hl.rm.regprog))
                top_to_mod = TRUE;
            else
            {
-               cur = wp->w_match_head;
+               matchitem_T *cur = wp->w_match_head;
+
                while (cur != NULL)
                {
                    if (cur->match.regprog != NULL
@@ -3315,7 +3314,9 @@ win_line(
 #endif
     int                screen_line_flags = 0;
 
+#if defined(FEAT_CONCEAL) || defined(FEAT_SEARCH_EXTRA)
     int                match_conc      = 0;    // cchar for match functions
+#endif
 #ifdef FEAT_CONCEAL
     int                syntax_flags    = 0;
     int                syntax_seqnr    = 0;
@@ -3859,7 +3860,9 @@ win_line(
      */
     for (;;)
     {
+#if defined(FEAT_CONCEAL) || defined(FEAT_SEARCH_EXTRA)
        int has_match_conc  = 0;        // match wants to conceal
+#endif
 #ifdef FEAT_CONCEAL
        int did_decrement_ptr = FALSE;
 #endif
index 4f9bebac0d7ff564f98531a31ff376aa4ad24794..9554f9be886b08560eb331cbc3891657088d7ba6 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1747,
 /**/
     1746,
 /**/