mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
suppress warnings
* compile.c (iseq_ibf_dump): check lenght overflow. * vm_core.h (rb_iseq_check): suppress unused-value warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b8574cdcff
commit
6a105387ce
2 changed files with 4 additions and 4 deletions
|
@ -8062,7 +8062,7 @@ iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt)
|
|||
|
||||
if (RTEST(opt)) {
|
||||
VALUE opt_str = rb_check_string_type(opt);
|
||||
header.extra_size = (unsigned int)RSTRING_LEN(opt_str) + 1;
|
||||
header.extra_size = RSTRING_LENINT(opt_str) + 1;
|
||||
ibf_dump_write(&dump, RSTRING_PTR(opt_str), header.extra_size);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -410,18 +410,18 @@ struct rb_iseq_struct {
|
|||
|
||||
#if USE_LAZY_LOAD
|
||||
const rb_iseq_t *rb_iseq_complete(const rb_iseq_t *iseq);
|
||||
#endif
|
||||
|
||||
static inline const rb_iseq_t *
|
||||
rb_iseq_check(const rb_iseq_t *iseq)
|
||||
{
|
||||
#if USE_LAZY_LOAD
|
||||
if (iseq->body == NULL) {
|
||||
rb_iseq_complete((rb_iseq_t *)iseq);
|
||||
}
|
||||
#endif
|
||||
return iseq;
|
||||
}
|
||||
#else
|
||||
#define rb_iseq_check(iseq) iseq
|
||||
#endif
|
||||
|
||||
enum ruby_special_exceptions {
|
||||
ruby_error_reenter,
|
||||
|
|
Loading…
Reference in a new issue