mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05: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
				
			
		| 
						 | 
				
			
			@ -4774,6 +4774,7 @@ compile_massign_lhs(rb_iseq_t *iseq, LINK_ANCHOR *const pre, LINK_ANCHOR *const
 | 
			
		|||
 | 
			
		||||
        LINK_ELEMENT *insn_element = LAST_ELEMENT(pre);
 | 
			
		||||
        iobj = (INSN *)get_prev_insn((INSN *)insn_element); /* send insn */
 | 
			
		||||
	ASSUME(iobj);
 | 
			
		||||
        ELEM_REMOVE(LAST_ELEMENT(pre));
 | 
			
		||||
        ELEM_REMOVE((LINK_ELEMENT *)iobj);
 | 
			
		||||
        pre->last = iobj->link.prev;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1
									
								
								vm.c
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								vm.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1653,6 +1653,7 @@ rb_vm_cref_replace_with_duplicated_cref(void)
 | 
			
		|||
    const rb_execution_context_t *ec = GET_EC();
 | 
			
		||||
    const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
 | 
			
		||||
    rb_cref_t *cref = vm_cref_replace_with_duplicated_cref(cfp->ep);
 | 
			
		||||
    ASSUME(cref);
 | 
			
		||||
    return cref;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1367,6 +1367,7 @@ vm_assert_env(VALUE obj)
 | 
			
		|||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
RBIMPL_ATTR_NONNULL((1))
 | 
			
		||||
static inline VALUE
 | 
			
		||||
VM_ENV_ENVVAL(const VALUE *ep)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -1376,6 +1377,7 @@ VM_ENV_ENVVAL(const VALUE *ep)
 | 
			
		|||
    return envval;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
RBIMPL_ATTR_NONNULL((1))
 | 
			
		||||
static inline const rb_env_t *
 | 
			
		||||
VM_ENV_ENVVAL_PTR(const VALUE *ep)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue