Mercurial > vim
changeset 6923:9a13e3910e3d v7.4.780
patch 7.4.780
Problem: Compiler complains about uninitialized variable and clobbered
variables.
Solution: Add Initialization. Make variables static.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 12 Jul 2015 16:21:23 +0200 |
parents | 681921dee50d |
children | 4b0a26cbea81 |
files | src/main.c src/ops.c src/version.c |
diffstat | 3 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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)