0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.3943: compiler warning from gcc for uninitialized variable

Problem:    Compiler warning from gcc for uninitialized variable.
Solution:   Initialize variable. (closes #9429)
This commit is contained in:
Bram Moolenaar
2021-12-30 10:51:45 +00:00
parent 8e7cc6b920
commit 491669701c
2 changed files with 3 additions and 4 deletions

View File

@@ -1636,7 +1636,7 @@ diff_read(
long off;
int i;
int notset = TRUE; // block "*dp" not set yet
diffhunk_T *hunk;
diffhunk_T *hunk = NULL; // init to avoid gcc warning
enum {
DIFF_ED,
@@ -1662,10 +1662,7 @@ diff_read(
{
hunk = ALLOC_ONE(diffhunk_T);
if (hunk == NULL)
{
emsg(_("E98: Cannot read diff output"));
return;
}
}
for (;;)

View File

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