diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2015-03-31 11:08:31 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-04-07 20:04:33 -0400 |
commit | 1b4dbdf45bfc59b84da48bbbac7209fda61c5d22 (patch) | |
tree | ffec869d14ab96989594419cdcfeee2fbfd93500 | |
parent | 3465a945e187bde08c34188eee2dc08ecae778dd (diff) | |
download | rneovim-1b4dbdf45bfc59b84da48bbbac7209fda61c5d22.tar.gz rneovim-1b4dbdf45bfc59b84da48bbbac7209fda61c5d22.tar.bz2 rneovim-1b4dbdf45bfc59b84da48bbbac7209fda61c5d22.zip |
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>
-rw-r--r-- | src/nvim/terminal.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index b3cdfe8775..f9786614f1 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -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; } |