diff --git a/TestScripts/reset-fork.sh b/TestScripts/reset-fork.sh old mode 100644 new mode 100755 diff --git a/asn.cpp b/asn.cpp index fb1bff0d..cd7a9337 100644 --- a/asn.cpp +++ b/asn.cpp @@ -330,7 +330,8 @@ void EncodedObjectFilter::Put(const byte *inString, size_t length) if (!m_queue.Get(m_id)) return; m_queue.TransferTo(CurrentTarget(), 1); - m_state = LENGTH; // fall through + m_state = LENGTH; + // fall through case LENGTH: { byte b; @@ -356,15 +357,16 @@ void EncodedObjectFilter::Put(const byte *inString, size_t length) m_state = IDENTIFIER; break; } - m_state = BODY; // fall through + m_state = BODY; } + // fall through case BODY: m_lengthRemaining -= m_queue.TransferTo(CurrentTarget(), m_lengthRemaining); if (m_lengthRemaining == 0) m_state = IDENTIFIER; - - case TAIL: // silence warnings + // fall through + case TAIL: case ALL_DONE: default: ;; } diff --git a/fltrimpl.h b/fltrimpl.h index d236a6c8..4fc4224b 100644 --- a/fltrimpl.h +++ b/fltrimpl.h @@ -54,6 +54,7 @@ #define FILTER_OUTPUT2_MODIFIABLE(site, statement, output, length, messageEnd) \ {\ + /* fall through */ \ case site: \ statement; \ if (OutputModifiable(site, output, length, messageEnd, blocking)) \ @@ -65,6 +66,7 @@ #define FILTER_OUTPUT2_MAYBE_MODIFIABLE(site, statement, output, length, messageEnd, modifiable) \ {\ + /* fall through */ \ case site: \ statement; \ if (modifiable ? OutputModifiable(site, output, length, messageEnd, blocking) : Output(site, output, length, messageEnd, blocking)) \ diff --git a/siphash.h b/siphash.h index ce4249f2..f8418c51 100644 --- a/siphash.h +++ b/siphash.h @@ -214,21 +214,27 @@ void SipHash_Base::TruncatedFinal(byte *digest, size_t digestSize) m_b[0] += m_idx; m_b[0] <<= 56U; switch (m_idx) { - // all fall through case 7: m_b[0] |= ((word64)m_acc[6]) << 48; + // fall through case 6: m_b[0] |= ((word64)m_acc[5]) << 40; + // fall through case 5: m_b[0] |= ((word64)m_acc[4]) << 32; + // fall through case 4: m_b[0] |= ((word64)m_acc[3]) << 24; + // fall through case 3: m_b[0] |= ((word64)m_acc[2]) << 16; + // fall through case 2: m_b[0] |= ((word64)m_acc[1]) << 8; + // fall through case 1: m_b[0] |= ((word64)m_acc[0]); + // fall through case 0: break; } diff --git a/twofish.cpp b/twofish.cpp index 52f94266..d7104cbd 100644 --- a/twofish.cpp +++ b/twofish.cpp @@ -37,7 +37,9 @@ inline word32 Twofish::Base::h0(word32 x, const word32 *key, unsigned int kLen) { #define Q(a, b, c, d, t) q[a][GETBYTE(t,0)] ^ (q[b][GETBYTE(t,1)] << 8) ^ (q[c][GETBYTE(t,2)] << 16) ^ (q[d][GETBYTE(t,3)] << 24) case 4: x = Q(1, 0, 0, 1, x) ^ key[6]; + // fall through case 3: x = Q(1, 1, 0, 0, x) ^ key[4]; + // fall through case 2: x = Q(0, 1, 0, 1, x) ^ key[2]; x = Q(0, 0, 1, 1, x) ^ key[0]; }