diff src/option.c @ 4033:3bd2c055319e v7.3.771

updated for version 7.3.771 Problem: Uninitialized variable. (Yasuhiro Matsumoto) Solution: Set x2 to -1.
author Bram Moolenaar <bram@vim.org>
date Thu, 17 Jan 2013 17:37:35 +0100
parents d179a8eff9d7
children 8904ccd5ee85
line wrap: on
line diff
--- a/src/option.c
+++ b/src/option.c
@@ -6154,7 +6154,8 @@ did_set_string_option(opt_idx, varp, new
 	{
 	    for (p = *varp; *p != NUL; ++p)
 	    {
-		int x2,x3 = -1;
+		int x2 = -1;
+		int x3 = -1;
 
 		if (*p != NUL)
 		    p += mb_ptr2len(p);
@@ -6165,8 +6166,7 @@ did_set_string_option(opt_idx, varp, new
 		    x3 = mb_ptr2char(p);
 		    p += mb_ptr2len(p);
 		}
-		if (x2 != ':' || x2 == -1 || x3 == -1
-						  || (*p != NUL && *p != ','))
+		if (x2 != ':' || x3 == -1 || (*p != NUL && *p != ','))
 		{
 		    errmsg = e_invarg;
 		    break;