Skip to content

Commit

Permalink
Add pointer cast to pacify warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Jan 6, 2017
1 parent 9a76a0b commit c6a1172
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ resize_capa(mrb_state *mrb, struct RString *s, size_t capacity)
RSTR_UNSET_EMBED_FLAG(s);
s->as.heap.ptr = tmp;
s->as.heap.len = len;
s->as.heap.aux.capa = capacity;
s->as.heap.aux.capa = (mrb_int)capacity;
}
}
else {
s->as.heap.ptr = (char *)mrb_realloc(mrb, RSTR_PTR(s), capacity+1);
s->as.heap.aux.capa = capacity;
s->as.heap.ptr = (char*)mrb_realloc(mrb, RSTR_PTR(s), capacity+1);
s->as.heap.aux.capa = (mrb_int)capacity;
}
}

Expand Down

0 comments on commit c6a1172

Please sign in to comment.