Address cppcheck 2.10 warnings (#2163)

Disable newer cppcheck until we can diagnose this further.
References #2162.
This commit is contained in:
Andrew Gaul 2023-06-25 16:04:16 +09:00 committed by GitHub
parent 45e7cd085a
commit 3b6688253f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 6 deletions

View File

@ -101,8 +101,8 @@ jobs:
- name: Cppcheck
run: |
# work around resource leak false positives on older Linux distributions
if cppcheck --version | awk '{if ($2 <= 1.86) { exit(1) } }'; then
# work around resource leak false positives on older and newer Linux distributions
if cppcheck --version | awk '{if ($2 <= 1.86 || $2 >= 2.10) { exit(1) } }'; then
make cppcheck
fi

View File

@ -44,6 +44,7 @@ cppcheck:
--enable=warning,style,information,missingInclude \
--suppress=missingIncludeSystem \
--suppress=unmatchedSuppression \
--suppress=useStlAlgorithm \
src/ test/
#

View File

@ -151,9 +151,7 @@ bool AdditionalHeader::Load(const char* file)
addheadlist.push_back(paddhead);
// set flag
if(!is_enable){
is_enable = true;
}
is_enable = true;
}
return true;
}

View File

@ -320,7 +320,7 @@ bool FdManager::HaveLseekHole()
}
FdManager::checked_lseek = true;
FdManager::have_lseek_hole = false;
return FdManager::have_lseek_hole;
return false;
}
// check SEEK_DATA/SEEK_HOLE options