diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-02-05 17:04:50 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-02-05 17:04:50 +0000 |
commit | 40b4872966d3886e7ff86184ae4ffb58704bf075 (patch) | |
tree | b2b7a5805aaa81490a6c7e99860be0838f8c38a1 /src/option.c | |
parent | c72078b631832a1f3d7d8ee90560d54f7d7d3ffe (diff) |
patch 9.0.1284: compiler warnings for uninitialized variablesv9.0.1284
Problem: Compiler warnings for uninitialized variables. (Tony Mechelynck)
Solution: Add variable initializations.
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/option.c b/src/option.c index f22f9f37ef..420d36d05c 100644 --- a/src/option.c +++ b/src/option.c @@ -2096,7 +2096,6 @@ do_set_option( char_u key_name[2]; int nextchar; // next non-white char after option name int afterchar; // character just after option name - int cp_val; char *errmsg = NULL; int key; int len; @@ -2167,6 +2166,7 @@ do_set_option( else { flags = P_STRING; + varp = NULL; if (key < 0) { key_name[0] = KEY2TERMCAP0(key); @@ -2183,10 +2183,10 @@ do_set_option( if (validate_opt_idx(opt_idx, opt_flags, flags, &errmsg) == FAIL) goto skip; + int cp_val = p_cp; if (vim_strchr((char_u *)"?=:!&<", nextchar) != NULL) { arg += len; - cp_val = p_cp; if (nextchar == '&' && arg[1] == 'v' && arg[2] == 'i') { if (arg[3] == 'm') // "opt&vim": set to Vim default |