Permalink
Browse files

Fix following splint warning.

src/tree.c: (in function rewrite_a)
src/tree.c:2077:16: Operands of < have incompatible types (unsigned int,
                       size_t): i < a->count
src/tree.c:2082:16: Operands of < have incompatible types (unsigned int,
                       size_t): i < a->count
src/tree.c:2086:4: Assignment of unsigned int to size_t: a->count = n
  • Loading branch information...
1 parent 2162d3e commit 685f9d7f0e72c99d521251c5cb675fd6d40b6825 @hiyuh hiyuh committed with May 8, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/tree.c
View
@@ -2044,12 +2044,12 @@ static tree_t tree_rewrite_aux(tree_t t, struct rewrite_ctx *ctx);
static void rewrite_a(struct tree_array *a, struct rewrite_ctx *ctx)
{
- for (unsigned i = 0; i < a->count; i++)
+ for (size_t i = 0; i < a->count; i++)
a->items[i] = tree_rewrite_aux(a->items[i], ctx);
// If an item was rewritten to NULL then delete it
- unsigned n = 0;
- for (unsigned i = 0; i < a->count; i++) {
+ size_t n = 0;
+ for (size_t i = 0; i < a->count; i++) {
if (a->items[i] != NULL)
a->items[n++] = a->items[i];
}

0 comments on commit 685f9d7

Please sign in to comment.