@@ -476,7 +476,7 @@ call_at_line_unprotected(VALUE args)
476
476
{
477
477
VALUE context ;
478
478
context = * RARRAY_PTR (args );
479
- return rb_funcall2 (context , idAtLine , RARRAY_LEN (args ) - 1 , RARRAY_PTR (args ) + 1 );
479
+ return rb_funcall2 (context , idAtLine , ( int ) RARRAY_LEN (args ) - 1 , RARRAY_PTR (args ) + 1 );
480
480
}
481
481
482
482
static VALUE
536
536
filename_cmp (VALUE source , char * file )
537
537
{
538
538
char * source_ptr , * file_ptr ;
539
- int s_len , f_len , min_len ;
540
- int s ,f ;
539
+ long s_len , f_len , min_len ;
540
+ long s ,f ;
541
541
int dirsep_flag = 0 ;
542
542
543
543
s_len = RSTRING_LEN (source );
@@ -1740,7 +1740,7 @@ check_frame_number(debug_context_t *debug_context, VALUE frame)
1740
1740
return frame_n ;
1741
1741
}
1742
1742
1743
- static int
1743
+ static long
1744
1744
optional_frame_position (int argc , VALUE * argv ) {
1745
1745
unsigned int i_scanned ;
1746
1746
VALUE level ;
@@ -2366,7 +2366,7 @@ FUNC_FASTCALL(do_jump)(rb_thread_t *th, rb_control_frame_t *cfp)
2366
2366
+1 for target frame
2367
2367
+1 for array terminator
2368
2368
*/
2369
- int frames = jump_cfp - cfp + 2 ;
2369
+ long frames = jump_cfp - cfp + 2 ;
2370
2370
debug_context -> old_iseq_catch = (iseq_catch_t * )malloc (frames * sizeof (iseq_catch_t ));
2371
2371
MEMZERO (debug_context -> old_iseq_catch , iseq_catch_t , frames );
2372
2372
frames = 0 ;
@@ -2410,7 +2410,7 @@ context_jump(VALUE self, VALUE line, VALUE file)
2410
2410
{
2411
2411
debug_context_t * debug_context ;
2412
2412
debug_frame_t * debug_frame ;
2413
- int i ;
2413
+ unsigned i ;
2414
2414
rb_thread_t * th ;
2415
2415
rb_control_frame_t * cfp ;
2416
2416
rb_control_frame_t * cfp_end ;
@@ -2434,7 +2434,7 @@ context_jump(VALUE self, VALUE line, VALUE file)
2434
2434
if (cfp -> pc == debug_frame -> info .runtime .last_pc )
2435
2435
{
2436
2436
cfp_start = cfp ;
2437
- if ((cfp -> pc - cfp -> iseq -> iseq_encoded ) >= (cfp -> iseq -> iseq_size - 1 ))
2437
+ if ((unsigned )( cfp -> pc - cfp -> iseq -> iseq_encoded ) >= (cfp -> iseq -> iseq_size - 1 ))
2438
2438
return (INT2FIX (1 )); /* no space for opt_call_c_function hijack */
2439
2439
break ;
2440
2440
}
0 commit comments