Remove unused variable

This commit is contained in:
Geert Janssens 2018-09-09 12:32:04 +02:00
parent bfa6cd52e8
commit 4cc61463ab

View File

@ -100,13 +100,12 @@ static void
gnc_environment_parse_one (const gchar *env_path)
{
GKeyFile *keyfile = g_key_file_new();
GError *error = NULL;
gchar **env_vars;
gsize param_count;
gint i;
gboolean got_keyfile;
got_keyfile = g_key_file_load_from_file (keyfile, env_path, G_KEY_FILE_NONE, &error);
got_keyfile = g_key_file_load_from_file (keyfile, env_path, G_KEY_FILE_NONE, NULL);
if ( !got_keyfile )
{
g_key_file_free(keyfile);
@ -114,7 +113,7 @@ gnc_environment_parse_one (const gchar *env_path)
}
/* Read the environment overrides and apply them */
env_vars = g_key_file_get_keys(keyfile, "Variables", &param_count, &error);
env_vars = g_key_file_get_keys(keyfile, "Variables", &param_count, NULL);
for ( i = 0; i < param_count; i++ )
{
gchar **val_list;
@ -125,7 +124,7 @@ gnc_environment_parse_one (const gchar *env_path)
/* For each variable, read its new value, optionally expand it and set/unset it */
val_list = g_key_file_get_string_list (keyfile, "Variables",
env_vars[i], &val_count,
&error );
NULL);
if ( val_count == 0 )
g_unsetenv (env_vars[i]);
else