Skip to content

Commit 91161ab

Browse files
committed
Fix warnings
1 parent 7eeb427 commit 91161ab

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/checkunusedfunctions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ bool CheckUnusedFunctions::check(const Settings& settings, ErrorLogger& errorLog
385385
if (func.filename != "+")
386386
filename = func.filename;
387387
errors.emplace_back(filename, func.fileIndex, func.lineNumber, func.column, it->first);
388-
} else if (func.isC && !func.isStatic && !func.usedOtherFile) {
388+
} else if (func.isC && !func.isStatic) {
389389
std::string filename;
390390
if (func.filename != "+")
391391
filename = func.filename;

lib/library.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Library::Error Library::load(const char exename[], const char path[], bool debug
210210
tinyxml2::XMLError error = xml_LoadFile(doc, fullfilename.c_str());
211211
if (error == tinyxml2::XML_ERROR_FILE_NOT_FOUND) {
212212
// only perform further lookups when the given path was not absolute
213-
if (!is_abs_path && error == tinyxml2::XML_ERROR_FILE_NOT_FOUND)
213+
if (!is_abs_path)
214214
{
215215
std::list<std::string> cfgfolders;
216216
#ifdef FILESDIR

lib/symboldatabase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ void SymbolDatabase::createSymbolDatabaseNeedInitialization()
10231023
if (var.isClass() && !var.isReference()) {
10241024
if (var.type()) {
10251025
// does this type need initialization?
1026-
if (var.type()->needInitialization == Type::NeedInitialization::True && !var.hasDefault() && !var.isStatic())
1026+
if (var.type()->needInitialization == Type::NeedInitialization::True && !var.hasDefault())
10271027
needInitialization = true;
10281028
else if (var.type()->needInitialization == Type::NeedInitialization::Unknown) {
10291029
if (!(var.valueType() && var.valueType()->type == ValueType::CONTAINER))

lib/vf_analyzers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ struct SingleValueFlowAnalyzer : ValueFlowAnalyzer {
12021202
return false;
12031203
if (value.isImpossible())
12041204
return false;
1205-
if (isConditional() && !value.isKnown() && !value.isImpossible())
1205+
if (isConditional() && !value.isKnown())
12061206
return true;
12071207
if (value.isSymbolicValue())
12081208
return false;

0 commit comments

Comments
 (0)