const UB1Traits& ub1traits,
const UB4x1Traits& ub4x1traits
){
- register ub4 a,b,c,len;
+ ub4 a,b,c,len;
/* Set up the internal state */
len = length;
c += length;
switch ( len ) /* all the case statements fall through */
{
- case 11: c += ( ( ub4 ) UB1Traits::as_ub1( k[10] ) << 24 );
- case 10: c += ( ( ub4 ) UB1Traits::as_ub1( k[9] ) << 16 );
- case 9: c += ( ( ub4 ) UB1Traits::as_ub1( k[8] ) << 8 );
+#if defined(__GNUC__) && __GNUC__ < 7
+ case 11: c += ( ( ub4 ) UB1Traits::as_ub1( k[10] ) << 24 ); /* fall through */
+ case 10: c += ( ( ub4 ) UB1Traits::as_ub1( k[9] ) << 16 ); /* fall through */
+ case 9: c += ( ( ub4 ) UB1Traits::as_ub1( k[8] ) << 8 ); /* fall through */
/* the first byte of c is reserved for the length */
- case 8: b += ( ( ub4 ) UB1Traits::as_ub1( k[7] ) << 24 );
- case 7: b += ( ( ub4 ) UB1Traits::as_ub1( k[6] ) << 16 );
- case 6: b += ( ( ub4 ) UB1Traits::as_ub1( k[5] ) << 8 );
- case 5: b += UB1Traits::as_ub1( k[4] );
- case 4: a += ( ( ub4 ) UB1Traits::as_ub1( k[3] ) << 24 );
- case 3: a += ( ( ub4 ) UB1Traits::as_ub1( k[2] ) << 16 );
- case 2: a += ( ( ub4 ) UB1Traits::as_ub1( k[1] ) << 8 );
+ case 8: b += ( ( ub4 ) UB1Traits::as_ub1( k[7] ) << 24 ); /* fall through */
+ case 7: b += ( ( ub4 ) UB1Traits::as_ub1( k[6] ) << 16 ); /* fall through */
+ case 6: b += ( ( ub4 ) UB1Traits::as_ub1( k[5] ) << 8 ); /* fall through */
+ case 5: b += UB1Traits::as_ub1( k[4] ); /* fall through */
+ case 4: a += ( ( ub4 ) UB1Traits::as_ub1( k[3] ) << 24 ); /* fall through */
+ case 3: a += ( ( ub4 ) UB1Traits::as_ub1( k[2] ) << 16 ); /* fall through */
+ case 2: a += ( ( ub4 ) UB1Traits::as_ub1( k[1] ) << 8 ); /* fall through */
case 1: a += UB1Traits::as_ub1( k[0] );
+#else
+ case 11: c += ( ( ub4 ) UB1Traits::as_ub1( k[10] ) << 24 ); __attribute((fallthrough));
+ case 10: c += ( ( ub4 ) UB1Traits::as_ub1( k[9] ) << 16 ); __attribute((fallthrough));
+ case 9: c += ( ( ub4 ) UB1Traits::as_ub1( k[8] ) << 8 ); __attribute((fallthrough));
+ /* the first byte of c is reserved for the length */
+ case 8: b += ( ( ub4 ) UB1Traits::as_ub1( k[7] ) << 24 ); __attribute((fallthrough));
+ case 7: b += ( ( ub4 ) UB1Traits::as_ub1( k[6] ) << 16 ); __attribute((fallthrough));
+ case 6: b += ( ( ub4 ) UB1Traits::as_ub1( k[5] ) << 8 ); __attribute((fallthrough));
+ case 5: b += UB1Traits::as_ub1( k[4] ); __attribute((fallthrough));
+ case 4: a += ( ( ub4 ) UB1Traits::as_ub1( k[3] ) << 24 ); __attribute((fallthrough));
+ case 3: a += ( ( ub4 ) UB1Traits::as_ub1( k[2] ) << 16 ); __attribute((fallthrough));
+ case 2: a += ( ( ub4 ) UB1Traits::as_ub1( k[1] ) << 8 ); __attribute((fallthrough));
+ case 1: a += UB1Traits::as_ub1( k[0] );
+#endif
/* case 0: nothing left to add */
}
mix( a,b,c );
ub4 initval, /* the previous hash, or an arbitrary value */
const UB4Traits& ub4traits
){
- register ub4 a,b,c,len;
+ ub4 a,b,c,len;
/* Set up the internal state */
len = length;