Blob Blame History Raw
To: vim_dev@googlegroups.com
Subject: Patch 7.3.587
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.587
Problem:    Compiler warning for local var shadowing global var.
Solution:   Rename the var and move it to an inner block. (Christian Brabandt)
Files:	    src/buffer.c


*** ../vim-7.3.586/src/buffer.c	2012-06-20 17:54:34.000000000 +0200
--- src/buffer.c	2012-07-06 16:19:32.000000000 +0200
***************
*** 1363,1371 ****
      int		action;
  {
      buf_T	*prevbuf;
- #ifdef FEAT_WINDOWS
-     win_T	*prevwin;
- #endif
      int		unload = (action == DOBUF_UNLOAD || action == DOBUF_DEL
  						     || action == DOBUF_WIPE);
  
--- 1363,1368 ----
***************
*** 1406,1412 ****
  #endif
  	{
  #ifdef FEAT_WINDOWS
! 	    prevwin = curwin;
  #endif
  	    if (prevbuf == curbuf)
  		u_sync(FALSE);
--- 1403,1409 ----
  #endif
  	{
  #ifdef FEAT_WINDOWS
! 	    win_T  *previouswin = curwin;
  #endif
  	    if (prevbuf == curbuf)
  		u_sync(FALSE);
***************
*** 1415,1423 ****
  			&& !P_HID(prevbuf)
  			&& !bufIsChanged(prevbuf)) ? DOBUF_UNLOAD : 0, FALSE);
  #ifdef FEAT_WINDOWS
! 	    if (curwin != prevwin && win_valid(prevwin))
  	      /* autocommands changed curwin, Grr! */
! 	      curwin = prevwin;
  #endif
  	}
      }
--- 1412,1420 ----
  			&& !P_HID(prevbuf)
  			&& !bufIsChanged(prevbuf)) ? DOBUF_UNLOAD : 0, FALSE);
  #ifdef FEAT_WINDOWS
! 	    if (curwin != previouswin && win_valid(previouswin))
  	      /* autocommands changed curwin, Grr! */
! 	      curwin = previouswin;
  #endif
  	}
      }
*** ../vim-7.3.586/src/version.c	2012-07-06 13:40:44.000000000 +0200
--- src/version.c	2012-07-06 16:19:08.000000000 +0200
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     587,
  /**/

-- 
There's no place like $(HOME)!

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///