patch 8.1.0718: a couple compiler warnings

Problem:    A couple compiler warnings.
Solution:   Rename shadowed variables.  Add UNUSED.
This commit is contained in:
Bram Moolenaar
2019-01-11 14:10:03 +01:00
parent 6b7b7190aa
commit 402385a7f2
2 changed files with 9 additions and 5 deletions

View File

@ -2402,7 +2402,7 @@ ins_char_bytes(char_u *buf, int charlen)
colnr_T vcol; colnr_T vcol;
int old_list; int old_list;
#ifndef FEAT_MBYTE #ifndef FEAT_MBYTE
char_u buf[2]; char_u cbuf[2];
#endif #endif
/* /*
@ -2422,10 +2422,12 @@ ins_char_bytes(char_u *buf, int charlen)
*/ */
getvcol(curwin, &curwin->w_cursor, NULL, &vcol, NULL); getvcol(curwin, &curwin->w_cursor, NULL, &vcol, NULL);
#ifndef FEAT_MBYTE #ifndef FEAT_MBYTE
buf[0] = c; cbuf[0] = c;
buf[1] = NUL; cbuf[1] = NUL;
#endif new_vcol = vcol + chartabsize(cbuf, vcol);
#else
new_vcol = vcol + chartabsize(buf, vcol); new_vcol = vcol + chartabsize(buf, vcol);
#endif
while (oldp[col + oldlen] != NUL && vcol < new_vcol) while (oldp[col + oldlen] != NUL && vcol < new_vcol)
{ {
vcol += chartabsize(oldp + col + oldlen, 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. * When "added" is negative text was deleted.
*/ */
void 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); changed_bytes(lnum, col);

View File

@ -799,6 +799,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
718,
/**/ /**/
717, 717,
/**/ /**/