From af8adc2d8c0af9906aaa719cf3e1a8b2b34ecb4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eliseo=20Marti=CC=81nez?= Date: Tue, 31 Mar 2015 11:12:01 +0200 Subject: [PATCH] Fix warnings: terminal.c: get_config_int(): Dead init: RI. Problem : Dead initialization @ 1119. Diagnostic : Real issue. Rationale : `obj` is immediately assigned another value through GET_CONFIG_VALUE macro. Resolution : Don't initialize. Helped-by: oni-link --- src/nvim/terminal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index f9786614f1..dda5cf69ab 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -1117,11 +1117,12 @@ static char *get_config_string(Terminal *term, char *key) static int get_config_int(Terminal *term, char *key) { - Object obj = OBJECT_INIT; + Object obj; GET_CONFIG_VALUE(term, key, obj); if (obj.type == kObjectTypeInteger) { return (int)obj.data.integer; } + api_free_object(obj); return 0; }