aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-02 20:00:49 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-02 20:15:58 +0900
commitb10be4e2ed76e7ff7d5d038c21b69c34dc0b196b (patch)
tree81fce486605e31889685a87b5bf2139a34795be3
parentevas filters: Shut up coverity (diff)
downloadefl-b10be4e2ed76e7ff7d5d038c21b69c34dc0b196b.tar.gz
evas filters: Disable extra debug
Forgot to remove that! It's better to disable for the release, DBG() and XDBG() are disabled anyway. CID 1308611
-rw-r--r--src/lib/evas/filters/evas_filter_parser.c23
-rw-r--r--src/lib/evas/include/evas_filter.h4
2 files changed, 15 insertions, 12 deletions
diff --git a/src/lib/evas/filters/evas_filter_parser.c b/src/lib/evas/filters/evas_filter_parser.c
index ce1e25ac9d..df68b03580 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -2231,26 +2231,29 @@ static inline void
_lua_import_path_get(char *path, size_t len, const char *name)
{
const char *pfx = _evas_module_datadir_get();
- size_t r;
+ size_t r = 0;
#ifdef FILTERS_DEBUG
// This is a hack to fetch the most recent file from source
char *sep = evas_file_path_join("", "");
char *src = strdup(__FILE__);
- char *slash = strrchr(src, *sep);
struct stat st;
- if (slash)
+ if (sep && src)
{
- *slash = '\0';
- if (*src == '/')
- r = snprintf(path, len - 1, "%s/lua/%s.lua", src, name);
- else // abs_srcdir is unknown here
- r = snprintf(path, len - 1, "%s/src/%s/lua/%s.lua", PACKAGE_BUILD_DIR, src, name);
- if (r >= len) path[len - 1] = '\0';
+ char *slash = strrchr(src, *sep);
+ if (slash)
+ {
+ *slash = '\0';
+ if (*src == '/')
+ r = snprintf(path, len - 1, "%s/lua/%s.lua", src, name);
+ else // abs_srcdir is unknown here
+ r = snprintf(path, len - 1, "%s/src/%s/lua/%s.lua", PACKAGE_BUILD_DIR, src, name);
+ if (r >= len) path[len - 1] = '\0';
+ }
}
free(sep);
free(src);
- if (!stat(path, &st)) return;
+ if (r && !stat(path, &st)) return;
#endif
r = snprintf(path, len - 1, "%s/filters/lua/%s.lua", pfx ? pfx : ".", name);
diff --git a/src/lib/evas/include/evas_filter.h b/src/lib/evas/include/evas_filter.h
index c4da4e75c3..3f88970dc0 100644
--- a/src/lib/evas/include/evas_filter.h
+++ b/src/lib/evas/include/evas_filter.h
@@ -32,9 +32,9 @@
# endif
#endif /* ! _WIN32 */
-//#ifdef DEBUG
+#ifdef DEBUG
# define FILTERS_DEBUG
-//#endif
+#endif
typedef struct _Evas_Filter_Instruction Evas_Filter_Instruction;
typedef struct _Evas_Filter_Buffer Evas_Filter_Buffer;