Skip to content

Commit

Permalink
Address cppcheck 2.10 warnings
Browse files Browse the repository at this point in the history
Disable newer cppcheck until we can diagnose this further.
References s3fs-fuse#2162.
  • Loading branch information
gaul committed Jun 24, 2023
1 parent 7c9cf84 commit f326c96
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ cppcheck:
-U ENOATTR \
--enable=warning,style,information,missingInclude \
--suppress=missingIncludeSystem \
--suppress=unmatchedSuppression \
--suppress=unmatchedSuppression:{} \
--suppress=useStlAlgorithm \
src/ test/

#
Expand Down
4 changes: 1 addition & 3 deletions src/addhead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/fdcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f326c96

Please sign in to comment.