Karsten Hopp 356f88
To: vim_dev@googlegroups.com
Karsten Hopp 356f88
Subject: Patch 7.4.821
Karsten Hopp 356f88
Fcc: outbox
Karsten Hopp 356f88
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 356f88
Mime-Version: 1.0
Karsten Hopp 356f88
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 356f88
Content-Transfer-Encoding: 8bit
Karsten Hopp 356f88
------------
Karsten Hopp 356f88
Karsten Hopp 356f88
Patch 7.4.821
Karsten Hopp 356f88
Problem:    Coverity reports a few problems.
Karsten Hopp 356f88
Solution:   Avoid the warnings. (Christian Brabandt)
Karsten Hopp 356f88
Files:      src/ex_docmd.c, src/option.c, src/screen.c
Karsten Hopp 356f88
Karsten Hopp 356f88
Karsten Hopp 356f88
*** ../vim-7.4.820/src/ex_docmd.c	2015-08-04 22:02:45.215119715 +0200
Karsten Hopp 356f88
--- src/ex_docmd.c	2015-08-11 18:51:20.646283285 +0200
Karsten Hopp 356f88
***************
Karsten Hopp 356f88
*** 4520,4525 ****
Karsten Hopp 356f88
--- 4520,4528 ----
Karsten Hopp 356f88
  			pos.col = MAXCOL;
Karsten Hopp 356f88
  		    else
Karsten Hopp 356f88
  			pos.col = 0;
Karsten Hopp 356f88
+ #ifdef FEAT_VIRTUALEDIT
Karsten Hopp 356f88
+ 		    pos.coladd = 0;
Karsten Hopp 356f88
+ #endif
Karsten Hopp 356f88
  		    if (searchit(curwin, curbuf, &pos,
Karsten Hopp 356f88
  				*cmd == '?' ? BACKWARD : FORWARD,
Karsten Hopp 356f88
  				(char_u *)"", 1L, SEARCH_MSG,
Karsten Hopp 356f88
*** ../vim-7.4.820/src/option.c	2015-07-22 22:19:33.073837041 +0200
Karsten Hopp 356f88
--- src/option.c	2015-08-11 18:51:20.650283237 +0200
Karsten Hopp 356f88
***************
Karsten Hopp 356f88
*** 9990,9995 ****
Karsten Hopp 356f88
--- 9990,9997 ----
Karsten Hopp 356f88
      buf_T	*buf = (buf_T *)from;
Karsten Hopp 356f88
  
Karsten Hopp 356f88
      opt_idx = findoption(name);
Karsten Hopp 356f88
+     if (opt_idx < 0)
Karsten Hopp 356f88
+ 	return;
Karsten Hopp 356f88
      p = &(options[opt_idx]);
Karsten Hopp 356f88
  
Karsten Hopp 356f88
      switch ((int)p->indir)
Karsten Hopp 356f88
*** ../vim-7.4.820/src/screen.c	2015-07-25 22:52:55.396781119 +0200
Karsten Hopp 356f88
--- src/screen.c	2015-08-11 18:51:55.205871139 +0200
Karsten Hopp 356f88
***************
Karsten Hopp 356f88
*** 7801,7807 ****
Karsten Hopp 356f88
  	}
Karsten Hopp 356f88
      }
Karsten Hopp 356f88
      posmatch->cur = 0;
Karsten Hopp 356f88
!     if (shl->lnum == lnum)
Karsten Hopp 356f88
      {
Karsten Hopp 356f88
  	colnr_T	start = posmatch->pos[bot].col == 0
Karsten Hopp 356f88
  					     ? 0 : posmatch->pos[bot].col - 1;
Karsten Hopp 356f88
--- 7801,7807 ----
Karsten Hopp 356f88
  	}
Karsten Hopp 356f88
      }
Karsten Hopp 356f88
      posmatch->cur = 0;
Karsten Hopp 356f88
!     if (shl->lnum == lnum && bot >= 0)
Karsten Hopp 356f88
      {
Karsten Hopp 356f88
  	colnr_T	start = posmatch->pos[bot].col == 0
Karsten Hopp 356f88
  					     ? 0 : posmatch->pos[bot].col - 1;
Karsten Hopp 356f88
*** ../vim-7.4.820/src/version.c	2015-08-11 18:45:43.122311811 +0200
Karsten Hopp 356f88
--- src/version.c	2015-08-11 18:52:13.809649302 +0200
Karsten Hopp 356f88
***************
Karsten Hopp 356f88
*** 743,744 ****
Karsten Hopp 356f88
--- 743,746 ----
Karsten Hopp 356f88
  {   /* Add new patch number below this line */
Karsten Hopp 356f88
+ /**/
Karsten Hopp 356f88
+     821,
Karsten Hopp 356f88
  /**/
Karsten Hopp 356f88
Karsten Hopp 356f88
-- 
Karsten Hopp 356f88
A poem:                read aloud:
Karsten Hopp 356f88
Karsten Hopp 356f88
<> !*''#               Waka waka bang splat tick tick hash,
Karsten Hopp 356f88
^"`$$-                 Caret quote back-tick dollar dollar dash,
Karsten Hopp 356f88
!*=@$_                 Bang splat equal at dollar under-score,
Karsten Hopp 356f88
%*<> ~#4               Percent splat waka waka tilde number four,
Karsten Hopp 356f88
&[]../                 Ampersand bracket bracket dot dot slash,
Karsten Hopp 356f88
|{,,SYSTEM HALTED      Vertical-bar curly-bracket comma comma CRASH.
Karsten Hopp 356f88
Karsten Hopp 356f88
Fred Bremmer and Steve Kroese (Calvin College & Seminary of Grand Rapids, MI.)
Karsten Hopp 356f88
Karsten Hopp 356f88
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 356f88
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 356f88
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 356f88
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///