[前][次][番号順一覧][スレッド一覧]

ruby-changes:50731

From: nobu <ko1@a...>
Date: Sat, 24 Mar 2018 20:04:42 +0900 (JST)
Subject: [ruby-changes:50731] nobu:r62906 (trunk): compile.c: suppress missing-noreturn

nobu	2018-03-24 20:04:37 +0900 (Sat, 24 Mar 2018)

  New Revision: 62906

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62906

  Log:
    compile.c: suppress missing-noreturn
    
    * compile.c (add_insn_info): move return statement to suppress
      missing-noreturn warning.

  Modified files:
    trunk/compile.c
Index: compile.c
===================================================================
--- compile.c	(revision 62905)
+++ compile.c	(revision 62906)
@@ -1945,9 +1945,6 @@ add_insn_info(struct iseq_insn_info_entr https://github.com/ruby/ruby/blob/trunk/compile.c#L1945
 	    positions[insns_info_index]             = code_index;
 	    return TRUE;
 	}
-	else {
-	    return FALSE;
-	}
     }
     else if (list->type == ISEQ_ELEMENT_ADJUST) {
 	ADJUST *adjust = (ADJUST *)list;
@@ -1958,13 +1955,11 @@ add_insn_info(struct iseq_insn_info_entr https://github.com/ruby/ruby/blob/trunk/compile.c#L1955
 	    positions[insns_info_index]             = code_index;
 	    return TRUE;
 	}
-	else {
-	    return FALSE;
-	}
     }
     else {
 	VM_UNREACHABLE(add_insn_info);
     }
+    return FALSE;
 }
 
 /**

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]