mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
file_search: Silence PVS/V614: used buffer is never uninitialized
This commit is contained in:
@@ -1541,21 +1541,25 @@ void do_autocmd_dirchanged(char *new_dir, CdScope scope)
|
|||||||
char buf[8];
|
char buf[8];
|
||||||
|
|
||||||
switch (scope) {
|
switch (scope) {
|
||||||
case kCdScopeGlobal:
|
case kCdScopeGlobal: {
|
||||||
snprintf(buf, sizeof(buf), "global");
|
snprintf(buf, sizeof(buf), "global");
|
||||||
break;
|
break;
|
||||||
case kCdScopeTab:
|
}
|
||||||
snprintf(buf, sizeof(buf), "tab");
|
case kCdScopeTab: {
|
||||||
break;
|
snprintf(buf, sizeof(buf), "tab");
|
||||||
case kCdScopeWindow:
|
break;
|
||||||
snprintf(buf, sizeof(buf), "window");
|
}
|
||||||
break;
|
case kCdScopeWindow: {
|
||||||
case kCdScopeInvalid:
|
snprintf(buf, sizeof(buf), "window");
|
||||||
// Should never happen.
|
break;
|
||||||
assert(false);
|
}
|
||||||
|
case kCdScopeInvalid: {
|
||||||
|
// Should never happen.
|
||||||
|
assert(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tv_dict_add_str(dict, S_LEN("scope"), buf);
|
tv_dict_add_str(dict, S_LEN("scope"), buf); // -V614
|
||||||
tv_dict_add_str(dict, S_LEN("cwd"), new_dir);
|
tv_dict_add_str(dict, S_LEN("cwd"), new_dir);
|
||||||
tv_dict_set_keys_readonly(dict);
|
tv_dict_set_keys_readonly(dict);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user