From 16f604f4690e09eff4cdd6169ef936d99dbf58c4 Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Thu, 22 Feb 2018 14:56:31 -0800 Subject: [PATCH] efl: fix warning due to vpath change. --- src/lib/efl/interfaces/efl_file.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib/efl/interfaces/efl_file.c b/src/lib/efl/interfaces/efl_file.c index 65060d858d..9f0be2e8a1 100644 --- a/src/lib/efl/interfaces/efl_file.c +++ b/src/lib/efl/interfaces/efl_file.c @@ -13,19 +13,21 @@ struct _Efl_File_Data static Eina_Bool _efl_file_file_set(Eo *obj, Efl_File_Data *pd, const char *file, const char *key) { + char *tmp = NULL; Eina_File *f = NULL; Eina_Bool r = EINA_FALSE; pd->error = EFL_IMAGE_LOAD_ERROR_DOES_NOT_EXIST; - if (file) + tmp = (char*)(file); + if (tmp) { - file = eina_vpath_resolve(file); + tmp = eina_vpath_resolve(tmp); } - if (file) + if (tmp) { - f = eina_file_open(file, EINA_FALSE); + f = eina_file_open(tmp, EINA_FALSE); if (!f) goto on_error; } @@ -36,7 +38,7 @@ _efl_file_file_set(Eo *obj, Efl_File_Data *pd, const char *file, const char *key on_error: - free(file); + free(tmp); return r; }