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

ruby-changes:66844

From: Kazuhiro <ko1@a...>
Date: Mon, 19 Jul 2021 17:22:24 +0900 (JST)
Subject: [ruby-changes:66844] 036f26a4e2 (master): Add `fall through`

https://git.ruby-lang.org/ruby.git/commit/?id=036f26a4e2

From 036f26a4e24d7e6e8de30aa7e3cedb19f7da88b0 Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Mon, 19 Jul 2021 17:21:45 +0900
Subject: Add `fall through`

Pointed out by Coverity Scan

```
** CID 1487522: Control flow issues (MISSING_BREAK)
/error.c: 1273 in exc_full_message()
```
---
 error.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/error.c b/error.c
index c01e887..ed860bb 100644
--- a/error.c
+++ b/error.c
@@ -1272,6 +1272,7 @@ exc_full_message(int argc, VALUE *argv, VALUE exc) https://github.com/ruby/ruby/blob/trunk/error.c#L1272
 	switch (args[kw_highlight]) {
 	  default:
             rb_bool_expected(args[kw_highlight], "highlight");
+	    /* fall through */
 	  case Qundef: args[kw_highlight] = Qnil; break;
 	  case Qtrue: case Qfalse: case Qnil: break;
 	}
-- 
cgit v1.1


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

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