From 772379edd9d6fc1e1fb2c4e7d0e30d673d66754d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Artur=20=C5=9Awigo=C5=84?= Date: Fri, 17 Mar 2023 12:39:16 +0100 Subject: [PATCH] elm_atspi_bridge: Use narrower index types This patch changes `long` to `int` for indices. They either come from other `int`-typed variables or from the literal value zero, and are further passed to functions which expect an `int` parameter (possibly unsigned, but values nearing 2^31 are purely theoretical, so it should never be a problem). Change-Id: I5b110f308cd63b692b3f616f2d999e5e6b56cb09 --- src/lib/elementary/elm_atspi_bridge.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index 05b5b2b..f1a7d58 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -4161,13 +4161,13 @@ _collection_match_attributes_lookup(Eo *obj, struct collection_match_rule *rule) static int _collection_sort_order_canonical(struct collection_match_rule *rule, Eina_List **ls, int count, int max, - Eo *obj, long index, Eina_Bool flag, + Eo *obj, int index, Eina_Bool flag, Eo *pobj, Eina_Bool recurse, Eina_Bool traverse) { int i = index; Eina_List *children; children = efl_access_object_access_children_get(obj); - long acount = eina_list_count(children); + int acount = eina_list_count(children); Eina_Bool prev = pobj ? EINA_TRUE : EINA_FALSE; for (; i < acount && (max == 0 || count < max); i++) @@ -4206,7 +4206,7 @@ _collection_sort_order_reverse_canonical(struct collection_match_rule *rule, Ein int count, int max, Eo *obj, Eina_Bool flag, Eo *pobj) { Eo *nextobj, *parent; - long indexinparent; + int indexinparent; Eina_List *children; /* This breaks us out of the recursion. */ @@ -4306,7 +4306,7 @@ _collection_inorder(Eo *collection, struct collection_match_rule *rule, Eina_Lis static int _collection_query(struct collection_match_rule *rule, AtspiCollectionSortOrder sortby, - Eina_List **list, int count, int max, Eo *obj, long index, + Eina_List **list, int count, int max, Eo *obj, int index, Eina_Bool flag, Eo *pobj, Eina_Bool recurse, Eina_Bool traverse) { switch (sortby) -- 2.7.4