Skip to content

Commit

Permalink
Fixed g++ 7 fall through warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
racko committed Aug 14, 2017
1 parent 548cf9e commit 778f47f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utilities/xmlrpcpp/libb64/src/cdecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
fragment = (char)base64_decode_value(*codechar++);
} while (fragment < 0);
*plainchar = (fragment & 0x03f) << 2;
//lint -fallthrough
case step_b:
do {
if (codechar == code_in+length_in)
Expand All @@ -57,6 +58,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
} while (fragment < 0);
*plainchar++ |= (fragment & 0x030) >> 4;
*plainchar = (fragment & 0x00f) << 4;
//lint -fallthrough
case step_c:
do {
if (codechar == code_in+length_in)
Expand All @@ -69,6 +71,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
} while (fragment < 0);
*plainchar++ |= (fragment & 0x03c) >> 2;
*plainchar = (fragment & 0x003) << 6;
//lint -fallthrough
case step_d:
do {
if (codechar == code_in+length_in)
Expand Down
2 changes: 2 additions & 0 deletions utilities/xmlrpcpp/libb64/src/cencode.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
result = (fragment & 0x0fc) >> 2;
*codechar++ = base64_encode_value(result);
result = (fragment & 0x003) << 4;
//lint -fallthrough
case step_B:
if (plainchar == plaintextend)
{
Expand All @@ -59,6 +60,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
result |= (fragment & 0x0f0) >> 4;
*codechar++ = base64_encode_value(result);
result = (fragment & 0x00f) << 2;
//lint -fallthrough
case step_C:
if (plainchar == plaintextend)
{
Expand Down

0 comments on commit 778f47f

Please sign in to comment.