Karsten Hopp 90a73e
To: vim_dev@googlegroups.com
Karsten Hopp 90a73e
Subject: Patch 7.3.076
Karsten Hopp 90a73e
Fcc: outbox
Karsten Hopp 90a73e
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 90a73e
Mime-Version: 1.0
Karsten Hopp 90a73e
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 90a73e
Content-Transfer-Encoding: 8bit
Karsten Hopp 90a73e
------------
Karsten Hopp 90a73e
Karsten Hopp 90a73e
Patch 7.3.076
Karsten Hopp 90a73e
Problem:    Clang warnings for dead code.
Karsten Hopp 90a73e
Solution:   Remove it. (Carlo Teubner)
Karsten Hopp 90a73e
Files:	    src/gui_gtk.c, src/if_ruby.c, src/misc2.c, src/netbeans.c,
Karsten Hopp 90a73e
	    src/spell.c
Karsten Hopp 90a73e
Karsten Hopp 90a73e
Karsten Hopp 90a73e
*** ../vim-7.3.075/src/gui_gtk.c	2010-11-24 18:48:08.000000000 +0100
Karsten Hopp 90a73e
--- src/gui_gtk.c	2010-12-08 12:25:17.000000000 +0100
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 1798,1804 ****
Karsten Hopp 90a73e
      char_u		*repl_text;
Karsten Hopp 90a73e
      gboolean		direction_down;
Karsten Hopp 90a73e
      SharedFindReplace	*sfr;
Karsten Hopp 90a73e
-     int			rc;
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
      flags = (int)(long)data;	    /* avoid a lint warning here */
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
--- 1798,1803 ----
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 1824,1830 ****
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
      repl_text = CONVERT_FROM_UTF8(repl_text);
Karsten Hopp 90a73e
      find_text = CONVERT_FROM_UTF8(find_text);
Karsten Hopp 90a73e
!     rc = gui_do_findrepl(flags, find_text, repl_text, direction_down);
Karsten Hopp 90a73e
      CONVERT_FROM_UTF8_FREE(repl_text);
Karsten Hopp 90a73e
      CONVERT_FROM_UTF8_FREE(find_text);
Karsten Hopp 90a73e
  }
Karsten Hopp 90a73e
--- 1823,1829 ----
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
      repl_text = CONVERT_FROM_UTF8(repl_text);
Karsten Hopp 90a73e
      find_text = CONVERT_FROM_UTF8(find_text);
Karsten Hopp 90a73e
!     gui_do_findrepl(flags, find_text, repl_text, direction_down);
Karsten Hopp 90a73e
      CONVERT_FROM_UTF8_FREE(repl_text);
Karsten Hopp 90a73e
      CONVERT_FROM_UTF8_FREE(find_text);
Karsten Hopp 90a73e
  }
Karsten Hopp 90a73e
*** ../vim-7.3.075/src/if_ruby.c	2010-11-24 17:03:34.000000000 +0100
Karsten Hopp 90a73e
--- src/if_ruby.c	2010-12-08 12:30:38.000000000 +0100
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 586,594 ****
Karsten Hopp 90a73e
  	if (u_save(eap->line1 - 1, eap->line2 + 1) != OK)
Karsten Hopp 90a73e
  	    return;
Karsten Hopp 90a73e
  	for (i = eap->line1; i <= eap->line2; i++) {
Karsten Hopp 90a73e
! 	    VALUE line, oldline;
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
! 	    line = oldline = vim_str2rb_enc_str((char *)ml_get(i));
Karsten Hopp 90a73e
  	    rb_lastline_set(line);
Karsten Hopp 90a73e
  	    eval_enc_string_protect((char *) eap->arg, &state);
Karsten Hopp 90a73e
  	    if (state) {
Karsten Hopp 90a73e
--- 586,594 ----
Karsten Hopp 90a73e
  	if (u_save(eap->line1 - 1, eap->line2 + 1) != OK)
Karsten Hopp 90a73e
  	    return;
Karsten Hopp 90a73e
  	for (i = eap->line1; i <= eap->line2; i++) {
Karsten Hopp 90a73e
! 	    VALUE line;
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
! 	    line = vim_str2rb_enc_str((char *)ml_get(i));
Karsten Hopp 90a73e
  	    rb_lastline_set(line);
Karsten Hopp 90a73e
  	    eval_enc_string_protect((char *) eap->arg, &state);
Karsten Hopp 90a73e
  	    if (state) {
Karsten Hopp 90a73e
*** ../vim-7.3.075/src/misc2.c	2010-08-15 21:57:32.000000000 +0200
Karsten Hopp 90a73e
--- src/misc2.c	2010-12-08 12:42:44.000000000 +0100
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 200,206 ****
Karsten Hopp 90a73e
  	}
Karsten Hopp 90a73e
  #endif
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
- 	idx = -1;
Karsten Hopp 90a73e
  	ptr = line;
Karsten Hopp 90a73e
  	while (col <= wcol && *ptr != NUL)
Karsten Hopp 90a73e
  	{
Karsten Hopp 90a73e
--- 200,205 ----
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 1223,1229 ****
Karsten Hopp 90a73e
  #endif
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
  /*
Karsten Hopp 90a73e
!  * copy a string into newly allocated memory
Karsten Hopp 90a73e
   */
Karsten Hopp 90a73e
      char_u *
Karsten Hopp 90a73e
  vim_strsave(string)
Karsten Hopp 90a73e
--- 1222,1228 ----
Karsten Hopp 90a73e
  #endif
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
  /*
Karsten Hopp 90a73e
!  * Copy "string" into newly allocated memory.
Karsten Hopp 90a73e
   */
Karsten Hopp 90a73e
      char_u *
Karsten Hopp 90a73e
  vim_strsave(string)
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 1239,1244 ****
Karsten Hopp 90a73e
--- 1238,1249 ----
Karsten Hopp 90a73e
      return p;
Karsten Hopp 90a73e
  }
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
+ /*
Karsten Hopp 90a73e
+  * Copy up to "len" bytes of "string" into newly allocated memory and
Karsten Hopp 90a73e
+  * terminate with a NUL.
Karsten Hopp 90a73e
+  * The allocated memory always has size "len + 1", also when "string" is
Karsten Hopp 90a73e
+  * shorter.
Karsten Hopp 90a73e
+  */
Karsten Hopp 90a73e
      char_u *
Karsten Hopp 90a73e
  vim_strnsave(string, len)
Karsten Hopp 90a73e
      char_u	*string;
Karsten Hopp 90a73e
*** ../vim-7.3.075/src/netbeans.c	2010-12-02 17:09:48.000000000 +0100
Karsten Hopp 90a73e
--- src/netbeans.c	2010-12-08 12:43:57.000000000 +0100
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 960,966 ****
Karsten Hopp 90a73e
      keyQ_T *key_node = keyHead.next;
Karsten Hopp 90a73e
      queue_T *cmd_node = head.next;
Karsten Hopp 90a73e
      nbbuf_T buf;
Karsten Hopp 90a73e
-     buf_T *bufp;
Karsten Hopp 90a73e
      int i;
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
      /* free the netbeans buffer list */
Karsten Hopp 90a73e
--- 960,965 ----
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 969,975 ****
Karsten Hopp 90a73e
  	buf = buf_list[i];
Karsten Hopp 90a73e
  	vim_free(buf.displayname);
Karsten Hopp 90a73e
  	vim_free(buf.signmap);
Karsten Hopp 90a73e
! 	if ((bufp=buf.bufp) != NULL)
Karsten Hopp 90a73e
  	{
Karsten Hopp 90a73e
  	    buf.bufp->b_netbeans_file = FALSE;
Karsten Hopp 90a73e
  	    buf.bufp->b_was_netbeans_file = FALSE;
Karsten Hopp 90a73e
--- 968,974 ----
Karsten Hopp 90a73e
  	buf = buf_list[i];
Karsten Hopp 90a73e
  	vim_free(buf.displayname);
Karsten Hopp 90a73e
  	vim_free(buf.signmap);
Karsten Hopp 90a73e
! 	if (buf.bufp != NULL)
Karsten Hopp 90a73e
  	{
Karsten Hopp 90a73e
  	    buf.bufp->b_netbeans_file = FALSE;
Karsten Hopp 90a73e
  	    buf.bufp->b_was_netbeans_file = FALSE;
Karsten Hopp 90a73e
*** ../vim-7.3.075/src/spell.c	2010-09-29 18:32:47.000000000 +0200
Karsten Hopp 90a73e
--- src/spell.c	2010-12-08 12:47:13.000000000 +0100
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 9839,9848 ****
Karsten Hopp 90a73e
  	{
Karsten Hopp 90a73e
  	    /* be quick for ASCII */
Karsten Hopp 90a73e
  	    if (wp->w_s->b_spell_ismw[*p])
Karsten Hopp 90a73e
- 	    {
Karsten Hopp 90a73e
  		s = p + 1;		/* skip a mid-word character */
Karsten Hopp 90a73e
- 		l = MB_BYTE2LEN(*s);
Karsten Hopp 90a73e
- 	    }
Karsten Hopp 90a73e
  	}
Karsten Hopp 90a73e
  	else
Karsten Hopp 90a73e
  	{
Karsten Hopp 90a73e
--- 9839,9845 ----
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 9850,9859 ****
Karsten Hopp 90a73e
  	    if (c < 256 ? wp->w_s->b_spell_ismw[c]
Karsten Hopp 90a73e
  		    : (wp->w_s->b_spell_ismw_mb != NULL
Karsten Hopp 90a73e
  			   && vim_strchr(wp->w_s->b_spell_ismw_mb, c) != NULL))
Karsten Hopp 90a73e
- 	    {
Karsten Hopp 90a73e
  		s = p + l;
Karsten Hopp 90a73e
- 		l = MB_BYTE2LEN(*s);
Karsten Hopp 90a73e
- 	    }
Karsten Hopp 90a73e
  	}
Karsten Hopp 90a73e
  
Karsten Hopp 90a73e
  	c = mb_ptr2char(s);
Karsten Hopp 90a73e
--- 9847,9853 ----
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 13813,13823 ****
Karsten Hopp 90a73e
  		    su->su_sfmaxscore = cleanup_suggestions(gap,
Karsten Hopp 90a73e
  				      su->su_sfmaxscore, SUG_CLEAN_COUNT(su));
Karsten Hopp 90a73e
  		else
Karsten Hopp 90a73e
- 		{
Karsten Hopp 90a73e
- 		    i = su->su_maxscore;
Karsten Hopp 90a73e
  		    su->su_maxscore = cleanup_suggestions(gap,
Karsten Hopp 90a73e
  					su->su_maxscore, SUG_CLEAN_COUNT(su));
Karsten Hopp 90a73e
- 		}
Karsten Hopp 90a73e
  	    }
Karsten Hopp 90a73e
  	}
Karsten Hopp 90a73e
      }
Karsten Hopp 90a73e
--- 13807,13814 ----
Karsten Hopp 90a73e
*** ../vim-7.3.075/src/version.c	2010-12-02 21:44:35.000000000 +0100
Karsten Hopp 90a73e
--- src/version.c	2010-12-08 13:10:00.000000000 +0100
Karsten Hopp 90a73e
***************
Karsten Hopp 90a73e
*** 716,717 ****
Karsten Hopp 90a73e
--- 716,719 ----
Karsten Hopp 90a73e
  {   /* Add new patch number below this line */
Karsten Hopp 90a73e
+ /**/
Karsten Hopp 90a73e
+     76,
Karsten Hopp 90a73e
  /**/
Karsten Hopp 90a73e
Karsten Hopp 90a73e
-- 
Karsten Hopp 90a73e
Never enter the boss's office unless it's absolutely necessary.  Every boss
Karsten Hopp 90a73e
saves one corner of the desk for useless assignments that are doled out like
Karsten Hopp 90a73e
Halloween candy to each visitor.
Karsten Hopp 90a73e
				(Scott Adams - The Dilbert principle)
Karsten Hopp 90a73e
Karsten Hopp 90a73e
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 90a73e
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 90a73e
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 90a73e
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///