Fix compiler warnings (-Wswitch-default)

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
This commit is contained in:
Ferry Huberts 2023-08-02 20:27:11 +02:00
parent 24f7c32da7
commit a6fbc026d5
6 changed files with 22 additions and 1 deletions

View File

@ -115,6 +115,9 @@ void Action::free() {
case TYPE_ERROR:
delete m_data.error;
break;
default:
break;
}
m_type = TYPE_NONE;
}

View File

@ -149,6 +149,8 @@ v_int32 ProcessingPipeline::iterate(data::buffer::InlineReadData& dataIn,
}
break;
default:
break;
}
}

View File

@ -102,6 +102,8 @@ void Server::run(std::function<bool()> conditional) {
throw std::runtime_error("[oatpp::network::server::run()] Error. Server already starting");
case STATUS_RUNNING:
throw std::runtime_error("[oatpp::network::server::run()] Error. Server already started");
default:
break;
}
m_threaded = false;
@ -125,6 +127,8 @@ void Server::run(bool startAsNewThread) {
throw std::runtime_error("[oatpp::network::server::run()] Error. Server already starting");
case STATUS_RUNNING:
throw std::runtime_error("[oatpp::network::server::run()] Error. Server already started");
default:
break;
}
m_threaded = startAsNewThread;
@ -147,6 +151,8 @@ void Server::stop() {
case STATUS_RUNNING:
setStatus(STATUS_STOPPING);
break;
default:
break;
}
if (m_threaded && m_thread.joinable()) {

View File

@ -246,6 +246,9 @@ void Connection::setStreamIOMode(oatpp::data::stream::IOMode ioMode) {
m_mode = data::stream::ASYNCHRONOUS;
break;
default:
break;
}
}
#endif

View File

@ -332,6 +332,7 @@ void Utils::unescapeStringToBuffer(const char* data, v_buff_size size, p_char8 r
case 'n': resultData[pos] = '\n'; pos ++; break;
case 'r': resultData[pos] = '\r'; pos ++; break;
case 't': resultData[pos] = '\t'; pos ++; break;
default: break;
}
i += 2;
} else {

View File

@ -64,6 +64,9 @@ void StatefulParser::ListenerCall::call(StatefulParser* parser) {
parser->m_listener->onPartData(data, size);
break;
default:
break;
}
}
@ -85,6 +88,9 @@ async::CoroutineStarter StatefulParser::ListenerCall::callAsync(StatefulParser*
case CALL_ON_DATA:
return parser->m_asyncListener->onPartDataAsync(data, size);
default:
break;
}
}
@ -351,4 +357,4 @@ bool StatefulParser::finished() {
return m_state == STATE_DONE;
}
}}}}
}}}}