ruby-changes:50250
From: k0kubun <ko1@a...>
Date: Sun, 11 Feb 2018 21:21:18 +0900 (JST)
Subject: [ruby-changes:50250] k0kubun:r62368 (trunk): _mjit_compile_send.erb: resolve warnings on clang
k0kubun 2018-02-11 21:21:13 +0900 (Sun, 11 Feb 2018) New Revision: 62368 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62368 Log: _mjit_compile_send.erb: resolve warnings on clang /var/folders/tp/g1f_46nj7md_d5_j799rfb140000gn/T//_ruby_mjit_p17396u162.c:2920:143: warning: incompatible integer to pointer conversion passing 'long' to parameter of type 'const VALUE *' (aka 'const unsigned long *') [-Wint-conversion] ...| VM_ENV_FLAG_LOCAL, calling.recv, calling.block_handler, 0x7fc14ceee660, 0x7fc14c870c00, argv + 0, 2, 3); ^~~~~~~~~~~~~~ /Users/k0kubun/.rbenv/versions/ruby-svn/include/ruby-2.6.0/x86_64-darwin16/rb_mjit_min_header-2.6.0.h:21299:21: note: passing argument to parameter 'pc' here const VALUE *pc, ^ /var/folders/tp/g1f_46nj7md_d5_j799rfb140000gn/T//_ruby_mjit_p17396u162.c:3073:31: warning: incompatible integer to pointer conversion passing 'long' to parameter of type 'const rb_iseq_t *' (aka 'const struct rb_iseq_struct *') [-Wint-conversion] vm_push_frame(ec, 0x7fc14c87d290, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling.recv, ca... ^~~~~~~~~~~~~~ /Users/k0kubun/.rbenv/versions/ruby-svn/include/ruby-2.6.0/x86_64-darwin16/rb_mjit_min_header-2.6.0.h:21294:25: note: passing argument to parameter 'iseq' here const rb_iseq_t *iseq, ^ Modified files: trunk/tool/ruby_vm/views/_mjit_compile_send.erb Index: tool/ruby_vm/views/_mjit_compile_send.erb =================================================================== --- tool/ruby_vm/views/_mjit_compile_send.erb (revision 62367) +++ tool/ruby_vm/views/_mjit_compile_send.erb (revision 62368) @@ -49,8 +49,8 @@ https://github.com/ruby/ruby/blob/trunk/tool/ruby_vm/views/_mjit_compile_send.erb#L49 fprintf(f, " VALUE v;\n"); fprintf(f, " VALUE *argv = reg_cfp->sp - calling.argc;\n"); fprintf(f, " reg_cfp->sp = argv - 1;\n"); /* recv */ - fprintf(f, " vm_push_frame(ec, 0x%"PRIxVALUE", VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling.recv, " - "calling.block_handler, 0x%"PRIxVALUE", 0x%"PRIxVALUE", argv + %d, %d, %d);\n", + fprintf(f, " vm_push_frame(ec, (const rb_iseq_t *)0x%"PRIxVALUE", VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling.recv, " + "calling.block_handler, 0x%"PRIxVALUE", (const VALUE *)0x%"PRIxVALUE", argv + %d, %d, %d);\n", (VALUE)iseq, (VALUE)cc->me, (VALUE)iseq->body->iseq_encoded, param_size, iseq->body->local_table_size - param_size, iseq->body->stack_max); fprintf(f, " if ((v = mjit_exec(ec)) == Qundef) {\n"); fprintf(f, " VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_FINISH);\n"); /* This is vm_call0_body's code after vm_call_iseq_setup */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/