diff src/misc2.c @ 2656:4549e0e7fbb6 v7.3.076

updated for version 7.3.076 Problem: Clang warnings for dead code. Solution: Remove it. (Carlo Teubner)
author Bram Moolenaar <bram@vim.org>
date Wed, 08 Dec 2010 13:11:21 +0100
parents 298d8d6e69be
children c5e47b752f07
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -200,7 +200,6 @@ coladvance2(pos, addspaces, finetune, wc
 	}
 #endif
 
-	idx = -1;
 	ptr = line;
 	while (col <= wcol && *ptr != NUL)
 	{
@@ -1223,7 +1222,7 @@ free_all_mem()
 #endif
 
 /*
- * copy a string into newly allocated memory
+ * Copy "string" into newly allocated memory.
  */
     char_u *
 vim_strsave(string)
@@ -1239,6 +1238,12 @@ vim_strsave(string)
     return p;
 }
 
+/*
+ * Copy up to "len" bytes of "string" into newly allocated memory and
+ * terminate with a NUL.
+ * The allocated memory always has size "len + 1", also when "string" is
+ * shorter.
+ */
     char_u *
 vim_strnsave(string, len)
     char_u	*string;