mgaman / PDUlib

Encode/Decode PDU strings for use with most GSM modems. Both 7 bit and 16 bit alphabets are supported.
GNU Lesser General Public License v2.1
22 stars 10 forks source link

Compiler complains on fallthrough #37

Closed baskluiters closed 1 year ago

baskluiters commented 1 year ago

Compiler for ESP32 in PlatformIO complains on fallthrough

.pio/libdeps/esp32dev/pdulib/src/pdulib.cpp: In member function 'int PDU::decodeAddress(const char*, char*, eLengthType)':
.pio/libdeps/esp32dev/pdulib/src/pdulib.cpp:963:22: warning: attribute 'fallthrough' not preceding a case label or default label
       [[fallthrough]];
                      ^

Removing the semicolon (;) after [[fallthrough]] seems to fix the issue. Using 0.5.7

mgaman commented 1 year ago

This is not a bug, see issue #26 in Readme. If the user chooses to implement Network Specific Numbers and uncomments the case 3: line then the warning goes away.