comparison src/misc1.c @ 15420:9171193ae720 v8.1.0718

patch 8.1.0718: a couple compiler warnings commit https://github.com/vim/vim/commit/402385a7f2fed23acef7ad3ce75252706b1d7606 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 11 14:10:03 2019 +0100 patch 8.1.0718: a couple compiler warnings Problem: A couple compiler warnings. Solution: Rename shadowed variables. Add UNUSED.
author Bram Moolenaar <Bram@vim.org>
date Fri, 11 Jan 2019 14:15:05 +0100
parents 3e02464faaac
children 55ccc2d353bd
comparison
equal deleted inserted replaced
15419:74088e9d6b52 15420:9171193ae720
2400 { 2400 {
2401 colnr_T new_vcol = 0; /* init for GCC */ 2401 colnr_T new_vcol = 0; /* init for GCC */
2402 colnr_T vcol; 2402 colnr_T vcol;
2403 int old_list; 2403 int old_list;
2404 #ifndef FEAT_MBYTE 2404 #ifndef FEAT_MBYTE
2405 char_u buf[2]; 2405 char_u cbuf[2];
2406 #endif 2406 #endif
2407 2407
2408 /* 2408 /*
2409 * Disable 'list' temporarily, unless 'cpo' contains the 'L' flag. 2409 * Disable 'list' temporarily, unless 'cpo' contains the 'L' flag.
2410 * Returns the old value of list, so when finished, 2410 * Returns the old value of list, so when finished,
2420 * be deleted to make room for the new character, counting screen 2420 * be deleted to make room for the new character, counting screen
2421 * cells. May result in adding spaces to fill a gap. 2421 * cells. May result in adding spaces to fill a gap.
2422 */ 2422 */
2423 getvcol(curwin, &curwin->w_cursor, NULL, &vcol, NULL); 2423 getvcol(curwin, &curwin->w_cursor, NULL, &vcol, NULL);
2424 #ifndef FEAT_MBYTE 2424 #ifndef FEAT_MBYTE
2425 buf[0] = c; 2425 cbuf[0] = c;
2426 buf[1] = NUL; 2426 cbuf[1] = NUL;
2427 #endif 2427 new_vcol = vcol + chartabsize(cbuf, vcol);
2428 #else
2428 new_vcol = vcol + chartabsize(buf, vcol); 2429 new_vcol = vcol + chartabsize(buf, vcol);
2430 #endif
2429 while (oldp[col + oldlen] != NUL && vcol < new_vcol) 2431 while (oldp[col + oldlen] != NUL && vcol < new_vcol)
2430 { 2432 {
2431 vcol += chartabsize(oldp + col + oldlen, vcol); 2433 vcol += chartabsize(oldp + col + oldlen, vcol);
2432 /* Don't need to remove a TAB that takes us to the right 2434 /* Don't need to remove a TAB that takes us to the right
2433 * position. */ 2435 * position. */
3023 /* 3025 /*
3024 * Like changed_bytes() but also adjust text properties for "added" bytes. 3026 * Like changed_bytes() but also adjust text properties for "added" bytes.
3025 * When "added" is negative text was deleted. 3027 * When "added" is negative text was deleted.
3026 */ 3028 */
3027 void 3029 void
3028 inserted_bytes(linenr_T lnum, colnr_T col, int added) 3030 inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED)
3029 { 3031 {
3030 changed_bytes(lnum, col); 3032 changed_bytes(lnum, col);
3031 3033
3032 #ifdef FEAT_TEXT_PROP 3034 #ifdef FEAT_TEXT_PROP
3033 if (curbuf->b_has_textprop && added != 0) 3035 if (curbuf->b_has_textprop && added != 0)