Skip to content

Commit a65ac94

Browse files
Use fall through comment to support gcc<7
1 parent 4c5cc17 commit a65ac94

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

cores/esp8266/libb64/cdecode.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static int base64_decode_block_signed(const int8_t* code_in, const int length_in
4343
fragment = (int8_t)base64_decode_value_signed(*codechar++);
4444
} while (fragment < 0);
4545
*plainchar = (fragment & 0x03f) << 2;
46-
__attribute__ ((fallthrough));
46+
// fall through
4747
case step_b:
4848
do {
4949
if (codechar == code_in+length_in){
@@ -55,7 +55,7 @@ static int base64_decode_block_signed(const int8_t* code_in, const int length_in
5555
} while (fragment < 0);
5656
*plainchar++ |= (fragment & 0x030) >> 4;
5757
*plainchar = (fragment & 0x00f) << 4;
58-
__attribute__ ((fallthrough));
58+
// fall through
5959
case step_c:
6060
do {
6161
if (codechar == code_in+length_in){
@@ -67,7 +67,7 @@ static int base64_decode_block_signed(const int8_t* code_in, const int length_in
6767
} while (fragment < 0);
6868
*plainchar++ |= (fragment & 0x03c) >> 2;
6969
*plainchar = (fragment & 0x003) << 6;
70-
__attribute__ ((fallthrough));
70+
// fall through
7171
case step_d:
7272
do {
7373
if (codechar == code_in+length_in){

cores/esp8266/libb64/cencode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
5050
result = (fragment & 0x0fc) >> 2;
5151
*codechar++ = base64_encode_value(result);
5252
result = (fragment & 0x003) << 4;
53-
__attribute__ ((fallthrough));
53+
// fall through
5454
case step_B:
5555
if (plainchar == plaintextend){
5656
state_in->result = result;
@@ -61,7 +61,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
6161
result |= (fragment & 0x0f0) >> 4;
6262
*codechar++ = base64_encode_value(result);
6363
result = (fragment & 0x00f) << 2;
64-
__attribute__ ((fallthrough));
64+
// fall through
6565
case step_C:
6666
if (plainchar == plaintextend){
6767
state_in->result = result;

libraries/ESP8266AVRISP/src/ESP8266AVRISP.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ AVRISPState_t ESP8266AVRISP::serve() {
109109
break;
110110
case AVRISP_STATE_PENDING: {
111111
_state = AVRISP_STATE_ACTIVE;
112-
// fallthrough
113-
__attribute__ ((fallthrough));
112+
// fall through
114113
}
115114
case AVRISP_STATE_ACTIVE: {
116115
while (_client.available()) {

libraries/ESP8266SdFat

0 commit comments

Comments
 (0)