patch 8.0.1524: compiler warnings for uninitialized variables
Problem: Compiler warnings for uninitialized variables. (Tony Mechelynck)
Solution: Initialize variables.
diff --git a/src/terminal.c b/src/terminal.c
index bcdc700..0f9aa86 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -3277,9 +3277,9 @@
char_u buf1[NUMBUFLEN];
char_u buf2[NUMBUFLEN];
char_u *fname1;
- char_u *fname2;
+ char_u *fname2 = NULL;
FILE *fd1;
- FILE *fd2;
+ FILE *fd2 = NULL;
char_u *textline = NULL;
/* First open the files. If this fails bail out. */
@@ -3460,7 +3460,7 @@
theend:
vim_free(textline);
fclose(fd1);
- if (do_diff)
+ if (fd2 != NULL)
fclose(fd2);
}