Skip to content

Commit 54f50cb

Browse files
chrisbrabrammool
authored andcommitted
patch 9.0.1637: compiler warning for uninitialized variable
Problem: Compiler warning for uninitialized variable. Solution: Move the variable to an inner block and initialize it. (Christian Brabandt, closes #12549)
1 parent 094dd15 commit 54f50cb

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/fileio.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ readfile(
218218
int using_b_ffname;
219219
int using_b_fname;
220220
static char *msg_is_a_directory = N_("is a directory");
221-
int eof;
222221
#ifdef FEAT_SODIUM
223222
int may_need_lseek = FALSE;
224223
#endif
@@ -1223,13 +1222,13 @@ readfile(
12231222
size -= conv_restlen;
12241223
}
12251224

1225+
int eof = FALSE;
12261226
if (read_buffer)
12271227
{
12281228
/*
12291229
* Read bytes from curbuf. Used for converting text read
12301230
* from stdin.
12311231
*/
1232-
eof = FALSE;
12331232
if (read_buf_lnum > from)
12341233
size = 0;
12351234
else
@@ -5477,7 +5476,7 @@ match_file_pat(
54775476
int
54785477
match_file_list(char_u *list, char_u *sfname, char_u *ffname)
54795478
{
5480-
char_u buf[100];
5479+
char_u buf[MAXPATHL];
54815480
char_u *tail;
54825481
char_u *regpat;
54835482
char allow_dirs;
@@ -5490,7 +5489,7 @@ match_file_list(char_u *list, char_u *sfname, char_u *ffname)
54905489
p = list;
54915490
while (*p)
54925491
{
5493-
copy_option_part(&p, buf, 100, ",");
5492+
copy_option_part(&p, buf, MAXPATHL, ",");
54945493
regpat = file_pat_to_reg_pat(buf, NULL, &allow_dirs, FALSE);
54955494
if (regpat == NULL)
54965495
break;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ static char *(features[]) =
695695

696696
static int included_patches[] =
697697
{ /* Add new patch number below this line */
698+
/**/
699+
1637,
698700
/**/
699701
1636,
700702
/**/

0 commit comments

Comments
 (0)