diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-07-12 16:21:23 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-07-12 16:21:23 +0200 |
commit | 1db43b1145fe466b5d41af6744a08083983de3a9 (patch) | |
tree | 77976095452e148bf15f09c4a36564675d1e17b8 | |
parent | 3ec326198029d5a59413b3b8b33dbc9c06c4f28b (diff) |
patch 7.4.780v7.4.780
Problem: Compiler complains about uninitialized variable and clobbered
variables.
Solution: Add Initialization. Make variables static.
-rw-r--r-- | src/main.c | 7 | ||||
-rw-r--r-- | src/ops.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c index abcf0c974e..096652fade 100644 --- a/src/main.c +++ b/src/main.c @@ -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) @@ -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" */ diff --git a/src/version.c b/src/version.c index f90e509304..c9691dd81f 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 780, +/**/ 779, /**/ 778, |