build: Treat warnings as errors (#923)

* squash and rebase andronov-alexey:treat_warnings_as_errors from pull request #850
* fix remaining warnings in java lib
This commit is contained in:
Malte Langkabel
2020-02-14 16:34:04 +01:00
committed by GitHub
parent e5c1a118d7
commit a30f47e27f
112 changed files with 634 additions and 430 deletions
@@ -89,7 +89,10 @@ Task::TaskState TaskExecuteCustomCommands::doUpdate(std::shared_ptr<Blackboard>
for (size_t i = 1 /*this method is counting as the first thread*/; i < m_indexerThreadCount; i++)
{
indexerThreads.push_back(std::make_shared<std::thread>(
&TaskExecuteCustomCommands::executeParallelIndexerCommands, this, i, blackboard));
&TaskExecuteCustomCommands::executeParallelIndexerCommands,
this,
static_cast<int>(i),
blackboard));
}
while (!m_interrupted && !m_serialCommands.empty())
@@ -138,7 +141,7 @@ Task::TaskState TaskExecuteCustomCommands::doUpdate(std::shared_ptr<Blackboard>
void TaskExecuteCustomCommands::doExit(std::shared_ptr<Blackboard> blackboard)
{
m_storage.reset();
const float duration = TimeStamp::durationSeconds(m_start);
const float duration = static_cast<float>(TimeStamp::durationSeconds(m_start));
blackboard->update<float>(
"index_time", [duration](float currentDuration) { return currentDuration + duration; });
}
@@ -336,7 +339,7 @@ void TaskExecuteCustomCommands::runPythonPostProcessing(PersistentStorage& stora
}
const std::wstring token = utility::decodeFromUtf8(
textAccess->getLine(startLoc->getLineNumber())
textAccess->getLine(static_cast<unsigned int>(startLoc->getLineNumber()))
.substr(
startLoc->getColumnNumber() - 1,
endLoc->getColumnNumber() - startLoc->getColumnNumber() + 1));