diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-11 14:10:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-11 14:10:03 +0100 |
commit | 402385a7f2fed23acef7ad3ce75252706b1d7606 (patch) | |
tree | 8faaa97b1b71c83cfd1882c2dcc9ee3c5306c479 | |
parent | 6b7b7190aa9e5c4f51bceaebf9275aa5097cfea1 (diff) | |
download | vim-git-402385a7f2fed23acef7ad3ce75252706b1d7606.tar.gz |
patch 8.1.0718: a couple compiler warningsv8.1.0718
Problem: A couple compiler warnings.
Solution: Rename shadowed variables. Add UNUSED.
-rw-r--r-- | src/misc1.c | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/misc1.c b/src/misc1.c index f8b726a93..ccd9b0796 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -2402,7 +2402,7 @@ ins_char_bytes(char_u *buf, int charlen) colnr_T vcol; int old_list; #ifndef FEAT_MBYTE - char_u buf[2]; + char_u cbuf[2]; #endif /* @@ -2422,10 +2422,12 @@ ins_char_bytes(char_u *buf, int charlen) */ getvcol(curwin, &curwin->w_cursor, NULL, &vcol, NULL); #ifndef FEAT_MBYTE - buf[0] = c; - buf[1] = NUL; -#endif + cbuf[0] = c; + cbuf[1] = NUL; + new_vcol = vcol + chartabsize(cbuf, vcol); +#else new_vcol = vcol + chartabsize(buf, vcol); +#endif while (oldp[col + oldlen] != NUL && vcol < new_vcol) { vcol += chartabsize(oldp + col + oldlen, vcol); @@ -3025,7 +3027,7 @@ changed_bytes(linenr_T lnum, colnr_T col) * When "added" is negative text was deleted. */ void -inserted_bytes(linenr_T lnum, colnr_T col, int added) +inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED) { changed_bytes(lnum, col); diff --git a/src/version.c b/src/version.c index 9d534c778..8344546f2 100644 --- a/src/version.c +++ b/src/version.c @@ -800,6 +800,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 718, +/**/ 717, /**/ 716, |