Skip to content

Commit 30df7a9

Browse files
committed
Fix fall-trough warning in latest gnu gcc
1 parent f9b7035 commit 30df7a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/cencode.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
4646
result = (fragment & 0x0fc) >> 2;
4747
*codechar++ = base64_encode_value(result);
4848
result = (fragment & 0x003) << 4;
49+
#ifndef _MSC_VER
50+
__attribute__ ((fallthrough));
51+
#endif
4952
case step_B:
5053
if (plainchar == plaintextend)
5154
{
@@ -57,6 +60,9 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
5760
result |= (fragment & 0x0f0) >> 4;
5861
*codechar++ = base64_encode_value(result);
5962
result = (fragment & 0x00f) << 2;
63+
#ifndef _MSC_VER
64+
__attribute__ ((fallthrough));
65+
#endif
6066
case step_C:
6167
if (plainchar == plaintextend)
6268
{

0 commit comments

Comments
 (0)