From 6c9f69c157abdb334936e0e6417eb0e937262762 Mon Sep 17 00:00:00 2001 From: Michal Kubecek Date: Wed, 31 Jul 2019 13:51:06 +0200 Subject: [PATCH] vmmon: mark expected switch fall through Since v5.3-rc2, kernel is built with -Wimplicit-fallthrough by default so that compiler warns about switch fall thgrough unless it is marked as expected. Add comment to mark one existing fall through as expected. Note: this function is no longer present in 15.1.0 and it is probably dead code anyway as hash2() is only called from HashFunc_HashPage() which does not seem to be called anywhere. But to keep the code as close to upstream as reasonably possible, just mark the fall through and keep both functions in place. --- vmmon-only/include/hashFunc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/vmmon-only/include/hashFunc.h b/vmmon-only/include/hashFunc.h index fec72614..eb0d4ebb 100644 --- a/vmmon-only/include/hashFunc.h +++ b/vmmon-only/include/hashFunc.h @@ -251,6 +251,7 @@ static INLINE ub8 hash2(register const ub8 *k, /* the key */ { /* c is reserved for the length */ case 2: b+=k[1]; + /* fall through */ case 1: a+=k[0]; /* case 0: nothing left to add */ }