summaryrefslogtreecommitdiff
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
parent61f4a5e033b67ea36a6403e4bd605f73e2b3bfe8 (diff)
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)
297 "function '%s' redefined (originally at %s:%d:%d)", 297 "function '%s' redefined (originally at %s:%d:%d)",
298 func->name, ofunc->base.file, 298 func->name, ofunc->base.file,
299 ofunc->base.line, ofunc->base.column); 299 ofunc->base.line, ofunc->base.column);
300 return _obj_error(&func->base, buf); 300 if (getenv("EOLIAN_WARN_FUNC_DUPLICATES"))
301 _obj_error(&func->base, buf);
301 } 302 }
302 303
303 if (func->get_ret_type && !_validate_type(func->get_ret_type)) 304 if (func->get_ret_type && !_validate_type(func->get_ret_type))
@@ -333,6 +334,10 @@ _validate_function(Eolian_Function *func, Eina_Hash *nhash)
333 if (!_validate_doc(func->set_return_doc)) 334 if (!_validate_doc(func->set_return_doc))
334 return EINA_FALSE; 335 return EINA_FALSE;
335 336
337 /* just for now, when dups become errors there will be no need to check */
338 if (!ofunc)
339 eina_hash_add(nhash, func->name, func);
340
336 return _validate(&func->base); 341 return _validate(&func->base);
337} 342}
338 343