Fix compiler warnings about incomplete handling of library error codes
This commit is contained in:
commit
26b699fd30
|
@ -1427,14 +1427,14 @@ bool SymbolDatabase::isFunction(const Token *tok, const Scope* outerScope, const
|
||||||
|
|
||||||
void SymbolDatabase::validate() const
|
void SymbolDatabase::validate() const
|
||||||
{
|
{
|
||||||
const std::size_t functions = functionScopes.size();
|
if (_settings->debugwarnings) {
|
||||||
for (std::size_t i = 0; i < functions; ++i) {
|
const std::size_t functions = functionScopes.size();
|
||||||
const Scope* scope = functionScopes[i];
|
for (std::size_t i = 0; i < functions; ++i) {
|
||||||
const Function* function = scope->function;
|
const Scope* scope = functionScopes[i];
|
||||||
if (scope->isExecutable() && !function) {
|
const Function* function = scope->function;
|
||||||
if (_settings->debugwarnings) {
|
if (scope->isExecutable() && !function) {
|
||||||
const std::list<const Token*> callstack(1, scope->classDef);
|
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,
|
const ErrorLogger::ErrorMessage errmsg(callstack, &_tokenizer->list, Severity::debug,
|
||||||
"symbolDatabaseWarning",
|
"symbolDatabaseWarning",
|
||||||
msg,
|
msg,
|
||||||
|
|
|
@ -1598,7 +1598,7 @@ private:
|
||||||
check("testing::testing()\n"
|
check("testing::testing()\n"
|
||||||
"{\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() {
|
void symboldatabase5() {
|
||||||
|
|
Loading…
Reference in New Issue