Patch 8.2.4051
Problem:    Compiler complains about possibly uninitialized variable.
Solution:   Add code to avoid a compiler warning. (John Marriott)
Files:      src/scriptfile.c


*** ../vim-8.2.4050/src/scriptfile.c    2022-01-09 21:32:57.709739119 +0000
--- src/scriptfile.c    2022-01-10 11:24:52.973878296 +0000
***************
*** 274,280 ****
  {
      static scid_T   last_current_SID = 0;
      int                   sid = ++last_current_SID;
!     scriptitem_T    *si;
  
      if (ga_grow(&script_items, (int)(sid - script_items.ga_len)) == FAIL)
      {
--- 274,280 ----
  {
      static scid_T   last_current_SID = 0;
      int                   sid = ++last_current_SID;
!     scriptitem_T    *si = NULL;
  
      if (ga_grow(&script_items, (int)(sid - script_items.ga_len)) == FAIL)
      {
***************
*** 305,312 ****
  # endif
      }
  
!     // Used to check script variable index is still valid.
!     si->sn_script_seq = current_sctx.sc_seq;
  
      return sid;
  }
--- 305,314 ----
  # endif
      }
  
!     // "si" can't be NULL, check only to avoid a compiler warning
!     if (si != NULL)
!       // Used to check script variable index is still valid.
!       si->sn_script_seq = current_sctx.sc_seq;
  
      return sid;
  }
*** ../vim-8.2.4050/src/version.c       2022-01-09 21:32:57.713739111 +0000
--- src/version.c       2022-01-09 21:35:53.713433768 +0000
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     4051,
  /**/

-- 
There is a fine line between courage and foolishness.
Unfortunately, it's not a fence.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220110133757.0B46A1C04D4%40moolenaar.net.

Raspunde prin e-mail lui