Fixed warnings 2 in the project (implicit cast, move, unused and uninitialized variables).

This commit is contained in:
Benjamin Kier 2019-05-28 14:22:37 -04:00 committed by Doug Camens
parent 1b6451ebfe
commit 5df66ea902
6 changed files with 8 additions and 8 deletions

View File

@ -174,7 +174,7 @@ Action CoroutineStarter::next(Action&& action) {
Action result = m_first;
m_first = nullptr;
m_last = nullptr;
return std::move(result);
return result;
}
CoroutineStarter& CoroutineStarter::next(CoroutineStarter&& starter) {

View File

@ -690,7 +690,7 @@ public:
m_coroutine->m_callback = (FunctionPtr)(callback);
Action result = m_coroutine;
m_coroutine = nullptr;
return std::move(result);
return result;
}

View File

@ -122,7 +122,7 @@ Deserializer::AbstractObjectWrapper Deserializer::readInt32Value(oatpp::parser::
if(caret.isAtText("null", true)){
return AbstractObjectWrapper(Int32::ObjectWrapper::Class::getType());
} else {
return AbstractObjectWrapper(Int32::ObjectType::createAbstract((int)caret.parseInt()), Int32::ObjectWrapper::Class::getType());
return AbstractObjectWrapper(Int32::ObjectType::createAbstract((const int)caret.parseInt()), Int32::ObjectWrapper::Class::getType());
}
}

View File

@ -298,8 +298,8 @@ void Parser::parseResponseStartingLine(ResponseStartingLine& line,
error = Status::CODE_400;
return;
}
line.statusCode = (int)caret.parseInt();
line.statusCode = (v_int32)caret.parseInt();
auto descriptionLabel = caret.putLabel();
if(caret.findRN()){

View File

@ -52,4 +52,4 @@ void DtoBody::declareHeaders(Headers& headers) noexcept {
}
}
}}}}}
}}}}}

View File

@ -116,7 +116,7 @@ void ChunkedBufferTest::onRun() {
OATPP_ASSERT(oatpp::String((const char*)&wholeText->getData()[i], substringSize, false) == stream.getSubstring(i, substringSize));
}
substringSize = ChunkedBuffer::CHUNK_ENTRY_SIZE * 2;
substringSize = (v_int32) ChunkedBuffer::CHUNK_ENTRY_SIZE * 2;
for(v_int32 i = 0; i < wholeText->getSize() - substringSize; i ++) {
OATPP_ASSERT(oatpp::String((const char*)&wholeText->getData()[i], substringSize, false) == stream.getSubstring(i, substringSize));
}
@ -126,4 +126,4 @@ void ChunkedBufferTest::onRun() {
}
}}}}}
}}}}}