mirror of
https://github.com/neovim/neovim.git
synced 2024-12-26 14:11:15 -07:00
Fix warnings: ex_docmd.c: eval_vars(): Unitialized arg: FP.
Problem : Uninitialized argument value @ 7704. Diagnostic : False positive. Rationale : Error occurs if `switch(spec_idx)` doesn't enter any case, which should not occur after `spec_idx = find_cmdline_var(...)` returned non-negative. Resolution : Add default clause to switch and error if reached.
This commit is contained in:
parent
49cf578b76
commit
1575642b11
@ -7699,6 +7699,10 @@ eval_vars (
|
||||
sprintf((char *)strbuf, "%" PRId64, (int64_t)sourcing_lnum);
|
||||
result = strbuf;
|
||||
break;
|
||||
default:
|
||||
// should not happen
|
||||
*errormsg = (char_u *)"";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
resultlen = (int)STRLEN(result); /* length of new string */
|
||||
|
Loading…
Reference in New Issue
Block a user