aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-10-25 13:03:20 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-10-25 13:03:20 +0200
commitc46f9bec2d15f23c09caf932164f2b00ee5c0903 (patch)
tree959ae6269a8bb8e747cc7a923d215f5f34b65729
parenteina_log: add parameter description on "eina_log_level_check"'s annotation (diff)
downloadefl-c46f9bec2d15f23c09caf932164f2b00ee5c0903.tar.gz
eolian: enable duplicate validation but only warn for now
Use the EOLIAN_WARN_FUNC_DUPLICATES environment variable to enable those warnings.
-rw-r--r--src/lib/eolian/database_validate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 6635e7501a..0b1dd0e252 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -297,7 +297,8 @@ _validate_function(Eolian_Function *func, Eina_Hash *nhash)
"function '%s' redefined (originally at %s:%d:%d)",
func->name, ofunc->base.file,
ofunc->base.line, ofunc->base.column);
- return _obj_error(&func->base, buf);
+ if (getenv("EOLIAN_WARN_FUNC_DUPLICATES"))
+ _obj_error(&func->base, buf);
}
if (func->get_ret_type && !_validate_type(func->get_ret_type))
@@ -333,6 +334,10 @@ _validate_function(Eolian_Function *func, Eina_Hash *nhash)
if (!_validate_doc(func->set_return_doc))
return EINA_FALSE;
+ /* just for now, when dups become errors there will be no need to check */
+ if (!ofunc)
+ eina_hash_add(nhash, func->name, func);
+
return _validate(&func->base);
}