mirror of
https://github.com/oatpp/oatpp.git
synced 2024-11-27 08:30:07 +08:00
Fix compiler warnings (-Wswitch-default)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
This commit is contained in:
parent
24f7c32da7
commit
a6fbc026d5
@ -115,6 +115,9 @@ void Action::free() {
|
||||
case TYPE_ERROR:
|
||||
delete m_data.error;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
m_type = TYPE_NONE;
|
||||
}
|
||||
|
@ -149,6 +149,8 @@ v_int32 ProcessingPipeline::iterate(data::buffer::InlineReadData& dataIn,
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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()) {
|
||||
|
@ -246,6 +246,9 @@ void Connection::setStreamIOMode(oatpp::data::stream::IOMode ioMode) {
|
||||
m_mode = data::stream::ASYNCHRONOUS;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}}}}
|
||||
}}}}
|
||||
|
Loading…
Reference in New Issue
Block a user