Skip to content

Commit

Permalink
[PRISM] Fix compiler warning for min_tmp_array_size
Browse files Browse the repository at this point in the history
prism_compile.c:5770:40: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
 5770 |                     if (tmp_array_size >= min_tmp_array_size) {
      |                                        ^~
  • Loading branch information
peterzhu2118 committed Jul 19, 2024
1 parent b226c34 commit e801fa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prism_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -5676,7 +5676,7 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret,
// own arrays, followed by a newarray, and then continually
// concat the arrays with the SplatNode nodes.
const int max_new_array_size = 0x100;
const int min_tmp_array_size = 0x40;
const unsigned int min_tmp_array_size = 0x40;

int new_array_size = 0;
bool first_chunk = true;
Expand Down

0 comments on commit e801fa5

Please sign in to comment.