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 <knil.ino@gmail.com>
This commit is contained in:
Eliseo Martínez 2015-03-31 11:12:01 +02:00 committed by Justin M. Keyes
parent 1b4dbdf45b
commit af8adc2d8c

View File

@ -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;
}