Skip to content

Commit 8d2360e

Browse files
One more try to make fall thru compat w/gcc 4~9
1 parent da36b64 commit 8d2360e

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
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-
// fall through
46+
// falls 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-
// fall through
58+
// falls 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-
// fall through
70+
// falls 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-
// fall through
53+
// falls 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-
// fall through
64+
// falls through
6565
case step_C:
6666
if (plainchar == plaintextend){
6767
state_in->result = result;

libraries/ESP8266AVRISP/src/ESP8266AVRISP.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,9 @@ AVRISPState_t ESP8266AVRISP::serve() {
107107
case AVRISP_STATE_IDLE:
108108
// should not be called when idle, error?
109109
break;
110-
case AVRISP_STATE_PENDING: {
110+
case AVRISP_STATE_PENDING:
111111
_state = AVRISP_STATE_ACTIVE;
112-
// fall through
113-
}
112+
// falls through
114113
case AVRISP_STATE_ACTIVE: {
115114
while (_client.available()) {
116115
avrisp();

libraries/ESP8266SdFat

tests/host/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ FLAGS += -DLWIP_IPV6=0
153153
FLAGS += -DHOST_MOCK=1
154154
FLAGS += -DNONOSDK221=1
155155
FLAGS += $(MKFLAGS)
156+
FLAGS += -Wimplicit-fallthrough=2 # allow "// fall through" comments to stop spurious warnings
156157
CXXFLAGS += -std=c++11 -fno-rtti $(FLAGS) -funsigned-char
157158
CFLAGS += -std=c99 $(FLAGS) -funsigned-char
158159
LDFLAGS += -coverage $(OPTZ) -g $(M32)

tests/host/common/UdpContextSocket.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ size_t mockUDPFillInBuf (int sock, char* ccinbuf, size_t& ccinbufsize, uint8_t&
155155
size_t mockUDPPeekBytes (int sock, char* dst, size_t usersize, int timeout_ms, char* ccinbuf, size_t& ccinbufsize)
156156
{
157157
(void) sock;
158+
(void) timeout_ms;
158159
if (usersize > CCBUFSIZE)
159160
fprintf(stderr, MOCK "CCBUFSIZE(%d) should be increased by %zd bytes (-> %zd)\n", CCBUFSIZE, usersize - CCBUFSIZE, usersize);
160161

0 commit comments

Comments
 (0)