mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
suppress warnings for probable NULL dererefences
This commit is contained in:
parent
e5c2bf55d0
commit
7459a32af3
Notes:
git
2021-10-24 19:25:21 +09:00
4 changed files with 8 additions and 1 deletions
|
@ -496,6 +496,7 @@ set_base_encoding(struct enc_table *enc_table, int index, rb_encoding *base)
|
|||
{
|
||||
rb_encoding *enc = enc_table->list[index].enc;
|
||||
|
||||
ASSUME(enc);
|
||||
enc_table->list[index].base = base;
|
||||
if (ENC_DUMMY_P(base)) ENC_SET_DUMMY((rb_raw_encoding *)enc);
|
||||
return enc;
|
||||
|
@ -758,7 +759,9 @@ rb_encdb_alias(const char *alias, const char *orig)
|
|||
void
|
||||
rb_encdb_set_unicode(int index)
|
||||
{
|
||||
((rb_raw_encoding *)rb_enc_from_index(index))->flags |= ONIGENC_FLAG_UNICODE;
|
||||
rb_raw_encoding *enc = (rb_raw_encoding *)rb_enc_from_index(index);
|
||||
ASSUME(enc);
|
||||
enc->flags |= ONIGENC_FLAG_UNICODE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue