1
0
forked from aniani/vim

patch 8.1.1032: warnings from clang static analyzer

Problem:    Warnings from clang static analyzer. (Yegappan Lakshmanan)
Solution:   Fix relevant warnings.
This commit is contained in:
Bram Moolenaar
2019-03-21 21:45:34 +01:00
parent f7e47af776
commit 2c519cf3bf
13 changed files with 20 additions and 29 deletions

View File

@@ -4405,7 +4405,6 @@ do_set(
key = 0;
if (*arg == '<')
{
nextchar = 0;
opt_idx = -1;
/* look out for <t_>;> */
if (arg[1] == 't' && arg[2] == '_' && arg[3] && arg[4])
@@ -7945,7 +7944,7 @@ set_chars_option(char_u **varp)
&& p[len] == ':'
&& p[len + 1] != NUL)
{
c1 = c2 = c3 = 0;
c2 = c3 = 0;
s = p + len + 1;
c1 = mb_ptr2char_adv(&s);
if (mb_char2cells(c1) > 1)
@@ -9379,6 +9378,7 @@ set_num_option(
if (!starting && errmsg == NULL && *get_vim_var_str(VV_OPTION_TYPE) == NUL)
{
char_u buf_old[11], buf_new[11], buf_type[7];
vim_snprintf((char *)buf_old, 10, "%ld", old_value);
vim_snprintf((char *)buf_new, 10, "%ld", value);
vim_snprintf((char *)buf_type, 7, "%s", (opt_flags & OPT_LOCAL) ? "local" : "global");