[lttng-dev] [PATCH urcu 3/3] Add missing fall through annotations

Michael Jeanson mjeanson at efficios.com
Wed Dec 12 15:01:39 EST 2018


Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
 tests/benchmark/test_urcu_hash.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/benchmark/test_urcu_hash.h b/tests/benchmark/test_urcu_hash.h
index 023ae1c..5e84aef 100644
--- a/tests/benchmark/test_urcu_hash.h
+++ b/tests/benchmark/test_urcu_hash.h
@@ -249,10 +249,11 @@ uint32_t hash_u32(
 
 	/*----------------------------------- handle the last 3 uint32_t's */
 	switch (length) {	/* all the case statements fall through */
-	case 3: c += k[2];
-	case 2: b += k[1];
+	case 3: c += k[2]; /* fall through */
+	case 2: b += k[1]; /* fall through */
 	case 1: a += k[0];
 		final(a, b, c);
+		/* fall through */
 	case 0:			/* case 0: nothing left to add */
 		break;
 	}
-- 
2.17.1



More information about the lttng-dev mailing list