Commit 50b73ec0e7d8d592bd56fe0da7c012414acf2748

Ran Benita 2014-02-08T15:10:09

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>

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;
 
     /*