Patch 8.2.3943

5 views
Skip to first unread message

Bram Moolenaar

unread,
Dec 30, 2021, 5:53:43 AM12/30/21
to vim...@googlegroups.com

Patch 8.2.3943
Problem: Compiler warning from gcc for uninitialized variable.
Solution: Initialize variable. (closes #9429)
Files: src/diff.c


*** ../vim-8.2.3942/src/diff.c 2021-12-29 11:59:48.375822066 +0000
--- src/diff.c 2021-12-30 10:49:32.769241062 +0000
***************
*** 1636,1642 ****
long off;
int i;
int notset = TRUE; // block "*dp" not set yet
! diffhunk_T *hunk;

enum {
DIFF_ED,
--- 1636,1642 ----
long off;
int i;
int notset = TRUE; // block "*dp" not set yet
! diffhunk_T *hunk = NULL; // init to avoid gcc warning

enum {
DIFF_ED,
***************
*** 1662,1671 ****
{
hunk = ALLOC_ONE(diffhunk_T);
if (hunk == NULL)
- {
- emsg(_("E98: Cannot read diff output"));
return;
- }
}

for (;;)
--- 1662,1668 ----
*** ../vim-8.2.3942/src/version.c 2021-12-30 10:32:21.156298119 +0000
--- src/version.c 2021-12-30 10:50:59.756983319 +0000
***************
*** 751,752 ****
--- 751,754 ----
{ /* Add new patch number below this line */
+ /**/
+ 3943,
/**/

--
You are not really successful until someone claims he sat
beside you in school.

/// 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