patch 8.2.3943: compiler warning from gcc for uninitialized variable
Problem: Compiler warning from gcc for uninitialized variable.
Solution: Initialize variable. (closes #9429)
diff --git a/src/diff.c b/src/diff.c
index d422338..a3bb9c4 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -1636,7 +1636,7 @@
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 @@
{
hunk = ALLOC_ONE(diffhunk_T);
if (hunk == NULL)
- {
- emsg(_("E98: Cannot read diff output"));
return;
- }
}
for (;;)