summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Cavalcante de Sousa <lucks.sousa@gmail.com>2020-05-20 10:17:14 -0300
committerFelipe Magno de Almeida <felipe@expertise.dev>2020-12-14 13:52:59 -0300
commitc5f80ad384bd64ff4e0d6bd44f5295c51ce4338e (patch)
tree6e631ab2a9c3321ca5592bb976b346044f365756
parent1e22a1b90b2d778e1334e76a93af8efeb63fedfb (diff)
downloadefl-c5f80ad384bd64ff4e0d6bd44f5295c51ce4338e.tar.gz
eina: Fixed undefined behavior usage of bitfields and enumerations
On Microsoft Visual Studio, enumerations are signed and consequently get sign-extended when used with bit-fields, which causes the number to become inadvertently negative. I removed the undefined behavior use by defining explictly as a unsigned int, so it works on all platforms.
-rw-r--r--src/lib/eina/eina_rbtree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eina/eina_rbtree.c b/src/lib/eina/eina_rbtree.c
index 764f55aef4..ff28383ac8 100644
--- a/src/lib/eina/eina_rbtree.c
+++ b/src/lib/eina/eina_rbtree.c
@@ -61,7 +61,7 @@ struct _Eina_Iterator_Rbtree_List
{
Eina_Rbtree *tree;
- Eina_Rbtree_Direction dir : 1;
+ unsigned int dir : 1;
Eina_Bool up : 1;
};