Fix compiler warnings about incomplete handling of library error codes

This commit is contained in:
Alexander Mai 2015-12-06 12:52:49 +01:00
commit 26b699fd30
2 changed files with 8 additions and 8 deletions

View File

@ -1427,14 +1427,14 @@ bool SymbolDatabase::isFunction(const Token *tok, const Scope* outerScope, const
void SymbolDatabase::validate() const
{
const std::size_t functions = functionScopes.size();
for (std::size_t i = 0; i < functions; ++i) {
const Scope* scope = functionScopes[i];
const Function* function = scope->function;
if (scope->isExecutable() && !function) {
if (_settings->debugwarnings) {
if (_settings->debugwarnings) {
const std::size_t functions = functionScopes.size();
for (std::size_t i = 0; i < functions; ++i) {
const Scope* scope = functionScopes[i];
const Function* function = scope->function;
if (scope->isExecutable() && !function) {
const std::list<const Token*> callstack(1, scope->classDef);
const std::string msg = std::string("executable scope '") + scope->classDef->str() + "' with unknown function";
const std::string msg = std::string("Executable scope '") + scope->classDef->str() + "' with unknown function.";
const ErrorLogger::ErrorMessage errmsg(callstack, &_tokenizer->list, Severity::debug,
"symbolDatabaseWarning",
msg,

View File

@ -1598,7 +1598,7 @@ private:
check("testing::testing()\n"
"{\n"
"}");
ASSERT_EQUALS("[test.cpp:1]: (debug) executable scope 'testing' with unknown function\n", errout.str());
ASSERT_EQUALS("[test.cpp:1]: (debug) Executable scope 'testing' with unknown function.\n", errout.str());
}
void symboldatabase5() {