]> granicus.if.org Git - vim/commitdiff
patch 7.4.780 v7.4.780
authorBram Moolenaar <Bram@vim.org>
Sun, 12 Jul 2015 14:21:23 +0000 (16:21 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 12 Jul 2015 14:21:23 +0000 (16:21 +0200)
Problem:    Compiler complains about uninitialized variable and clobbered
            variables.
Solution:   Add Initialization.  Make variables static.

src/main.c
src/ops.c
src/version.c

index abcf0c974eeac198e7a77b4f17746b64ec43d182..096652fadeac2f49c5f3de598892a3e8423173cf 100644 (file)
@@ -1069,9 +1069,10 @@ main_loop(cmdwin, noexmode)
     oparg_T    oa;                             /* operator arguments */
     volatile int previous_got_int = FALSE;     /* "got_int" was TRUE */
 #ifdef FEAT_CONCEAL
-    linenr_T   conceal_old_cursor_line = 0;
-    linenr_T   conceal_new_cursor_line = 0;
-    int                conceal_update_lines = FALSE;
+    /* these are static to avoid a compiler warning */
+    static linenr_T    conceal_old_cursor_line = 0;
+    static linenr_T    conceal_new_cursor_line = 0;
+    static int         conceal_update_lines = FALSE;
 #endif
 
 #if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
index e8820517124c817a5a9a8ef0e3bf8dc272c6cc1b..671c92b4f23ae04bcba26c1c48e63124e14350d8 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -5403,7 +5403,7 @@ do_addsub(command, Prenum1, g_cmd)
     int                i;
     int                lnum = curwin->w_cursor.lnum;
     int                lnume = curwin->w_cursor.lnum;
-    int                startcol;
+    int                startcol = 0;
     int                did_change = FALSE;
 
     dohex = (vim_strchr(curbuf->b_p_nf, 'x') != NULL); /* "heX" */
index f90e5093044af46bd4a8f2414829c236e8391453..c9691dd81fea456f650508857dd40775bf712400 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    780,
 /**/
     779,
 /**/