Skip to content

Commit

Permalink
Fix following splint warning.
Browse files Browse the repository at this point in the history
src/tree.c: (in function copy_a)
src/tree.c:2263:16: Operands of < have incompatible types (unsigned int,
                       size_t): i < from->count
src/tree.c: (in function copy_p)
src/tree.c:2275:16: Operands of < have incompatible types (unsigned int,
                       size_t): i < from->count
  • Loading branch information
hiyuh authored and nickg committed May 13, 2012
1 parent 685f9d7 commit 08d74d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tree.c
Expand Up @@ -2225,7 +2225,7 @@ static void copy_a(struct tree_array *from, struct tree_array *to,
to->count = to->max = from->count; to->count = to->max = from->count;
to->items = xmalloc(to->count * sizeof(param_t)); to->items = xmalloc(to->count * sizeof(param_t));


for (unsigned i = 0; i < from->count; i++) for (size_t i = 0; i < from->count; i++)
to->items[i] = tree_copy_aux(from->items[i], ctx); to->items[i] = tree_copy_aux(from->items[i], ctx);
} }


Expand All @@ -2235,7 +2235,7 @@ static void copy_p(struct param_array *from, struct param_array *to,
to->count = to->max = from->count; to->count = to->max = from->count;
to->items = xmalloc(to->count * sizeof(param_t)); to->items = xmalloc(to->count * sizeof(param_t));


for (unsigned i = 0; i < from->count; i++) { for (size_t i = 0; i < from->count; i++) {
param_t *fp = &from->items[i]; param_t *fp = &from->items[i];
param_t *tp = &to->items[i]; param_t *tp = &to->items[i];


Expand Down

0 comments on commit 08d74d8

Please sign in to comment.