Use unsigned int for saving darray_size return value See: b9b3593cbdeb7f5b02d50cecaba6a0b47d4979ad So these should be unsigned int's now. Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
diff --git a/src/xkbcomp/ast-build.c b/src/xkbcomp/ast-build.c
index 77cffab..5be9473 100644
--- a/src/xkbcomp/ast-build.c
+++ b/src/xkbcomp/ast-build.c
@@ -202,7 +202,7 @@ ExprCreateKeysymList(xkb_keysym_t sym)
ExprDef *
ExprCreateMultiKeysymList(ExprDef *expr)
{
- size_t nLevels = darray_size(expr->keysym_list.symsMapIndex);
+ unsigned nLevels = darray_size(expr->keysym_list.symsMapIndex);
darray_resize(expr->keysym_list.symsMapIndex, 1);
darray_resize(expr->keysym_list.symsNumEntries, 1);
@@ -215,7 +215,7 @@ ExprCreateMultiKeysymList(ExprDef *expr)
ExprDef *
ExprAppendKeysymList(ExprDef *expr, xkb_keysym_t sym)
{
- size_t nSyms = darray_size(expr->keysym_list.syms);
+ unsigned nSyms = darray_size(expr->keysym_list.syms);
darray_append(expr->keysym_list.symsMapIndex, nSyms);
darray_append(expr->keysym_list.symsNumEntries, 1);
@@ -227,8 +227,8 @@ ExprAppendKeysymList(ExprDef *expr, xkb_keysym_t sym)
ExprDef *
ExprAppendMultiKeysymList(ExprDef *expr, ExprDef *append)
{
- size_t nSyms = darray_size(expr->keysym_list.syms);
- size_t numEntries = darray_size(append->keysym_list.syms);
+ unsigned nSyms = darray_size(expr->keysym_list.syms);
+ unsigned numEntries = darray_size(append->keysym_list.syms);
darray_append(expr->keysym_list.symsMapIndex, nSyms);
darray_append(expr->keysym_list.symsNumEntries, numEntries);
diff --git a/src/xkbcomp/rules.c b/src/xkbcomp/rules.c
index 955bc00..d757a81 100644
--- a/src/xkbcomp/rules.c
+++ b/src/xkbcomp/rules.c
@@ -720,7 +720,7 @@ static bool
append_expanded_kccgst_value(struct matcher *m, darray_char *to,
struct sval value)
{
- const size_t original_size = darray_size(*to);
+ const unsigned original_size = darray_size(*to);
const char *s = value.start;
/*