]> granicus.if.org Git - vim/commitdiff
updated for version 7.4a.031 v7.4a.031
authorBram Moolenaar <Bram@vim.org>
Wed, 17 Jul 2013 17:22:13 +0000 (19:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 17 Jul 2013 17:22:13 +0000 (19:22 +0200)
Problem:    Compiler warnings. (Charles Campbell)
Solution:   Initialize variables even when not needed.

src/regexp_nfa.c
src/search.c
src/version.c

index 02fe49ea16034bcd82a4f49492dff826d0164d37..f920e09b50568f89c6c59ec9cff9e177370ac842 100644 (file)
@@ -4060,9 +4060,13 @@ skip_add:
                sub = &subs->norm;
            }
 
+           /* avoid compiler warnings */
+           save_ptr = NULL;
+           save_lpos.lnum = 0;
+           save_lpos.col = 0;
+
            /* Set the position (with "off" added) in the subexpression.  Save
             * and restore it when it was in use.  Otherwise fill any gap. */
-           save_ptr = NULL;
            if (REG_MULTI)
            {
                if (subidx < sub->in_use)
@@ -4192,11 +4196,16 @@ skip_add:
                    sub->list.multi[subidx].end.col =
                                          (colnr_T)(reginput - regline + off);
                }
+               /* avoid compiler warnings */
+               save_ptr = NULL;
            }
            else
            {
                save_ptr = sub->list.line[subidx].end;
                sub->list.line[subidx].end = reginput + off;
+               /* avoid compiler warnings */
+               save_lpos.lnum = 0;
+               save_lpos.col = 0;
            }
 
            subs = addstate(l, state->out, subs, pim, off);
index b3ff18fa8b9e54c97f88016ef5d976f4066b803c..23dc27ea876575251f9c047bbd0dc2c2094a1f4d 100644 (file)
@@ -4509,7 +4509,7 @@ current_search(count, forward)
     int                result;         /* result of various function calls */
     char_u     old_p_ws = p_ws;
     int                flags = 0;
-    pos_T      save_VIsual;
+    pos_T      save_VIsual = VIsual;
     int                one_char;
 
     /* wrapping should not occur */
@@ -4522,7 +4522,6 @@ current_search(count, forward)
     if (VIsual_active)
     {
        orig_pos = curwin->w_cursor;
-       save_VIsual = VIsual;
 
        pos = curwin->w_cursor;
        start_pos = VIsual;
index 65cd3b08f2dd91b3cca4b8d1854badb5c1bfe0c6..e2410669336c545c708b038ee5f37f8462cb6597 100644 (file)
@@ -727,6 +727,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    31,
 /**/
     30,
 /**/