mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.0.0236: gcc complains about uninitialized variable
Problem: Gcc complains that a variable may be used uninitialized. Confusion between variable and label name. (John Marriott) Solution: Initialize it. Rename end to end_lnum.
This commit is contained in:
10
src/ops.c
10
src/ops.c
@@ -3774,13 +3774,13 @@ do_put(
|
|||||||
*/
|
*/
|
||||||
if (y_type == MCHAR && y_size == 1)
|
if (y_type == MCHAR && y_size == 1)
|
||||||
{
|
{
|
||||||
linenr_T end;
|
linenr_T end_lnum = 0; /* init for gcc */
|
||||||
|
|
||||||
if (VIsual_active)
|
if (VIsual_active)
|
||||||
{
|
{
|
||||||
end = curbuf->b_visual.vi_end.lnum;
|
end_lnum = curbuf->b_visual.vi_end.lnum;
|
||||||
if (end < curbuf->b_visual.vi_start.lnum)
|
if (end_lnum < curbuf->b_visual.vi_start.lnum)
|
||||||
end = curbuf->b_visual.vi_start.lnum;
|
end_lnum = curbuf->b_visual.vi_start.lnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -3815,7 +3815,7 @@ do_put(
|
|||||||
}
|
}
|
||||||
if (VIsual_active)
|
if (VIsual_active)
|
||||||
lnum++;
|
lnum++;
|
||||||
} while (VIsual_active && lnum <= end);
|
} while (VIsual_active && lnum <= end_lnum);
|
||||||
|
|
||||||
if (VIsual_active) /* reset lnum to the last visual line */
|
if (VIsual_active) /* reset lnum to the last visual line */
|
||||||
lnum--;
|
lnum--;
|
||||||
|
@@ -764,6 +764,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 */
|
||||||
|
/**/
|
||||||
|
236,
|
||||||
/**/
|
/**/
|
||||||
235,
|
235,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user