summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2020-04-20 14:19:26 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2020-04-20 14:19:26 +0200
commite565e989eee5846bc121ddff80ca75c3642d3427 (patch)
tree88b57ca2dce398eb707f93c06ebeaf587a7555ab
parentdf16616febb21074033ed6e477518b87e100c3e7 (diff)
eolian: only warn instead of erroring on unused imports
-rw-r--r--src/lib/eolian/database_check.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/eolian/database_check.c b/src/lib/eolian/database_check.c
index 02a8de84db..96ea24d984 100644
--- a/src/lib/eolian/database_check.c
+++ b/src/lib/eolian/database_check.c
@@ -212,10 +212,9 @@ _check_constant(const Eolian_Constant *v, Eina_Hash *depset, Eina_Hash *chash)
212 _check_expr(v->value, depset); 212 _check_expr(v->value, depset);
213} 213}
214 214
215static Eina_Bool 215static void
216_check_unit(const Eolian_Unit *unit) 216_check_unit(const Eolian_Unit *unit)
217{ 217{
218 Eina_Bool ret = EINA_TRUE;
219 Eina_Hash *depset = eina_hash_pointer_new(NULL); 218 Eina_Hash *depset = eina_hash_pointer_new(NULL);
220 219
221 /* collect all real dependencies of the unit */ 220 /* collect all real dependencies of the unit */
@@ -253,13 +252,11 @@ _check_unit(const Eolian_Unit *unit)
253 { 252 {
254 eolian_state_log(unit->state, "%s: unused dependency %s", 253 eolian_state_log(unit->state, "%s: unused dependency %s",
255 unit->file, cunit->file); 254 unit->file, cunit->file);
256 ret = EINA_FALSE;
257 } 255 }
258 } 256 }
259 eina_iterator_free(citr); 257 eina_iterator_free(citr);
260 258
261 eina_hash_free(depset); 259 eina_hash_free(depset);
262 return ret;
263} 260}
264 261
265static Eina_Bool 262static Eina_Bool
@@ -301,10 +298,7 @@ database_check(const Eolian_State *state)
301 Eina_Iterator *itr = eolian_state_units_get(state); 298 Eina_Iterator *itr = eolian_state_units_get(state);
302 const Eolian_Unit *unit; 299 const Eolian_Unit *unit;
303 EINA_ITERATOR_FOREACH(itr, unit) 300 EINA_ITERATOR_FOREACH(itr, unit)
304 { 301 _check_unit(unit);
305 if (!_check_unit(unit))
306 ret = EINA_FALSE;
307 }
308 eina_iterator_free(itr); 302 eina_iterator_free(itr);
309 303
310 /* namespace checks */ 304 /* namespace checks */