mirror of
https://github.com/neovim/neovim.git
synced 2024-12-31 17:13:26 -07:00
Fix warnings: terminal.c: get_config_string(): Dead init: RI.
Problem : Dead initialization @ 1109. Diagnostic : Real issue. Rationale : `obj` is immediately assigned another value through GET_CONFIG_VALUE macro. Resolution : Don't initialize. Helped-by: oni-link <knil.ino@gmail.com>
This commit is contained in:
parent
3465a945e1
commit
1b4dbdf45b
@ -1099,18 +1099,19 @@ static bool is_focused(Terminal *term)
|
||||
do { \
|
||||
Error err; \
|
||||
o = dict_get_value(t->buf->b_vars, cstr_as_string(k), &err); \
|
||||
if (obj.type == kObjectTypeNil) { \
|
||||
if (o.type == kObjectTypeNil) { \
|
||||
o = dict_get_value(&globvardict, cstr_as_string(k), &err); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static char *get_config_string(Terminal *term, char *key)
|
||||
{
|
||||
Object obj = OBJECT_INIT;
|
||||
Object obj;
|
||||
GET_CONFIG_VALUE(term, key, obj);
|
||||
if (obj.type == kObjectTypeString) {
|
||||
return obj.data.string.data;
|
||||
}
|
||||
api_free_object(obj);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user