Skip to content

Commit

Permalink
added /*fallthrough*/ comments for compatibility with gcc-7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Szabo committed Jul 11, 2018
1 parent 56632ca commit 9ca1c6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libtomcrypt/src/ciphers/twofish/twofish.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,13 @@ static void h_func(const unsigned char *in, unsigned char *out, unsigned char *M
y[1] = (unsigned char)(sbox(0, (ulong32)y[1]) ^ M[4 * (6 + offset) + 1]);
y[2] = (unsigned char)(sbox(0, (ulong32)y[2]) ^ M[4 * (6 + offset) + 2]);
y[3] = (unsigned char)(sbox(1, (ulong32)y[3]) ^ M[4 * (6 + offset) + 3]);
/*fallthrough*/
case 3:
y[0] = (unsigned char)(sbox(1, (ulong32)y[0]) ^ M[4 * (4 + offset) + 0]);
y[1] = (unsigned char)(sbox(1, (ulong32)y[1]) ^ M[4 * (4 + offset) + 1]);
y[2] = (unsigned char)(sbox(0, (ulong32)y[2]) ^ M[4 * (4 + offset) + 2]);
y[3] = (unsigned char)(sbox(0, (ulong32)y[3]) ^ M[4 * (4 + offset) + 3]);
/*fallthrough*/
case 2:
y[0] = (unsigned char)(sbox(1, sbox(0, sbox(0, (ulong32)y[0]) ^ M[4 * (2 + offset) + 0]) ^ M[4 * (0 + offset) + 0]));
y[1] = (unsigned char)(sbox(0, sbox(0, sbox(1, (ulong32)y[1]) ^ M[4 * (2 + offset) + 1]) ^ M[4 * (0 + offset) + 1]));
Expand Down

0 comments on commit 9ca1c6b

Please sign in to comment.