Skip to content

Commit 4c5cc17

Browse files
Clean up trivial gcc -wextra warnings
After verifying that they really were spurious, clean up the warnings that gcc -wextra reports, except for LeaMDNS.
1 parent 3f35506 commit 4c5cc17

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

cores/esp8266/libb64/cdecode.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +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));
4647
case step_b:
4748
do {
4849
if (codechar == code_in+length_in){
@@ -54,6 +55,7 @@ static int base64_decode_block_signed(const int8_t* code_in, const int length_in
5455
} while (fragment < 0);
5556
*plainchar++ |= (fragment & 0x030) >> 4;
5657
*plainchar = (fragment & 0x00f) << 4;
58+
__attribute__ ((fallthrough));
5759
case step_c:
5860
do {
5961
if (codechar == code_in+length_in){
@@ -65,6 +67,7 @@ static int base64_decode_block_signed(const int8_t* code_in, const int length_in
6567
} while (fragment < 0);
6668
*plainchar++ |= (fragment & 0x03c) >> 2;
6769
*plainchar = (fragment & 0x003) << 6;
70+
__attribute__ ((fallthrough));
6871
case step_d:
6972
do {
7073
if (codechar == code_in+length_in){

cores/esp8266/libb64/cencode.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +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));
5354
case step_B:
5455
if (plainchar == plaintextend){
5556
state_in->result = result;
@@ -60,6 +61,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
6061
result |= (fragment & 0x0f0) >> 4;
6162
*codechar++ = base64_encode_value(result);
6263
result = (fragment & 0x00f) << 2;
64+
__attribute__ ((fallthrough));
6365
case step_C:
6466
if (plainchar == plaintextend){
6567
state_in->result = result;

libraries/ESP8266AVRISP/src/ESP8266AVRISP.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ AVRISPState_t ESP8266AVRISP::serve() {
110110
case AVRISP_STATE_PENDING: {
111111
_state = AVRISP_STATE_ACTIVE;
112112
// fallthrough
113+
__attribute__ ((fallthrough));
113114
}
114115
case AVRISP_STATE_ACTIVE: {
115116
while (_client.available()) {

libraries/ESP8266SdFat

tests/host/common/include/ClientContext.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ class ClientContext
258258

259259
void keepAlive (uint16_t idle_sec = TCP_DEFAULT_KEEPALIVE_IDLE_SEC, uint16_t intv_sec = TCP_DEFAULT_KEEPALIVE_INTERVAL_SEC, uint8_t count = TCP_DEFAULT_KEEPALIVE_COUNT)
260260
{
261+
(void) idle_sec;
262+
(void) intv_sec;
263+
(void) count;
261264
mockverbose("TODO ClientContext::keepAlive()\n");
262265
}
263266

0 commit comments

Comments
 (0)