From 767d0a171668fbfcc5bbd9c060bb59d192717ce3 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Tue, 3 Sep 2024 13:16:24 -0400 Subject: [PATCH] [PRISM] Fix up compile warning for sign comparison --- prism_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prism_compile.c b/prism_compile.c index 5bd02ed04f..d1c9d5431e 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -10405,7 +10405,7 @@ pm_parse_process(pm_parse_result_t *result, pm_node_t *node, VALUE *script_lines for (size_t index = 0; index < parser->newline_list.size; index++) { size_t offset = parser->newline_list.offsets[index]; - size_t length = index == parser->newline_list.size - 1 ? (parser->end - (parser->start + offset)) : (parser->newline_list.offsets[index + 1] - offset); + size_t length = index == parser->newline_list.size - 1 ? ((size_t) (parser->end - (parser->start + offset))) : (parser->newline_list.offsets[index + 1] - offset); rb_ary_push(*script_lines, rb_enc_str_new((const char *) parser->start + offset, length, scope_node->encoding)); }