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:
@@ -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 (;;)
|
||||
|
Reference in New Issue
Block a user