fix unused parameter warnings

fix switch warinings

part of #319
This commit is contained in:
Links
2018-05-12 11:39:59 +02:00
parent 9ce044e550
commit bde97179bf
3 changed files with 15 additions and 0 deletions

View File

@ -318,6 +318,8 @@ void WebSocketsClient::setReconnectInterval(unsigned long time) {
void WebSocketsClient::messageReceived(WSclient_t * client, WSopcode_t opcode, uint8_t * payload, size_t length, bool fin) {
WStype_t type = WStype_ERROR;
UNUSED(client);
switch(opcode) {
case WSop_text:
type = fin ? WStype_TEXT : WStype_FRAGMENT_TEXT_START;
@ -328,6 +330,11 @@ void WebSocketsClient::messageReceived(WSclient_t * client, WSopcode_t opcode, u
case WSop_continuation:
type = fin ? WStype_FRAGMENT_FIN : WStype_FRAGMENT;
break;
case WSop_close:
case WSop_ping:
case WSop_pong:
default:
break;
}
runCbEvent(type, payload, length);