Patch 9.0.1637

7 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 16, 2023, 5:04:18 PM6/16/23
to vim...@googlegroups.com

Patch 9.0.1637
Problem: Compiler warning for uninitialized variable.
Solution: Move the variable to an inner block and initialize it. (Christian
Brabandt, closes #12549)
Files: src/fileio.c


*** ../vim-9.0.1636/src/fileio.c 2023-05-27 18:02:50.192062438 +0100
--- src/fileio.c 2023-06-16 21:35:59.249319541 +0100
***************
*** 218,224 ****
int using_b_ffname;
int using_b_fname;
static char *msg_is_a_directory = N_("is a directory");
- int eof;
#ifdef FEAT_SODIUM
int may_need_lseek = FALSE;
#endif
--- 218,223 ----
***************
*** 1223,1235 ****
size -= conv_restlen;
}

if (read_buffer)
{
/*
* Read bytes from curbuf. Used for converting text read
* from stdin.
*/
- eof = FALSE;
if (read_buf_lnum > from)
size = 0;
else
--- 1222,1234 ----
size -= conv_restlen;
}

+ int eof = FALSE;
if (read_buffer)
{
/*
* Read bytes from curbuf. Used for converting text read
* from stdin.
*/
if (read_buf_lnum > from)
size = 0;
else
***************
*** 5477,5483 ****
int
match_file_list(char_u *list, char_u *sfname, char_u *ffname)
{
! char_u buf[100];
char_u *tail;
char_u *regpat;
char allow_dirs;
--- 5476,5482 ----
int
match_file_list(char_u *list, char_u *sfname, char_u *ffname)
{
! char_u buf[MAXPATHL];
char_u *tail;
char_u *regpat;
char allow_dirs;
***************
*** 5490,5496 ****
p = list;
while (*p)
{
! copy_option_part(&p, buf, 100, ",");
regpat = file_pat_to_reg_pat(buf, NULL, &allow_dirs, FALSE);
if (regpat == NULL)
break;
--- 5489,5495 ----
p = list;
while (*p)
{
! copy_option_part(&p, buf, MAXPATHL, ",");
regpat = file_pat_to_reg_pat(buf, NULL, &allow_dirs, FALSE);
if (regpat == NULL)
break;
*** ../vim-9.0.1636/src/version.c 2023-06-15 22:51:53.381597754 +0100
--- src/version.c 2023-06-16 21:41:14.208508095 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1637,
/**/

--
hundred-and-one symptoms of being an internet addict:
184. You no longer ask prospective dates what their sign is, instead
your line is "Hi, what's your URL?"

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages