]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/container/hashfunc.h
Fix the build
[xonotic/netradiant.git] / libs / container / hashfunc.h
index 6d2166971488b65e7601395d47a533c8aefe9d4e..305202d0c9f00435bdcdab0c0798363abf5a8ef2 100644 (file)
@@ -203,17 +203,17 @@ inline ub4 hash(
        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 );
+       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 );
-       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 ); __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] );
                /* case 0: nothing left to add */
        }