Skip to content

Commit

Permalink
mitigated Unchecked return value Coverity warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Feb 12, 2024
1 parent 0c82876 commit 6f2a06d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/findtoken.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ std::vector<T*> findTokensSkipDeadCode(const Library* library,
const Evaluate& evaluate)
{
std::vector<T*> result;
findTokensSkipDeadCodeImpl(
(void)findTokensSkipDeadCodeImpl(
library,
start,
end,
Expand All @@ -199,7 +199,7 @@ template<class T, class Predicate, class Evaluate, REQUIRES("T must be a Token c
T* findTokenSkipDeadCode(const Library* library, T* start, const Token* end, const Predicate& pred, const Evaluate& evaluate)
{
T* result = nullptr;
findTokensSkipDeadCodeImpl(
(void)findTokensSkipDeadCodeImpl(
library,
start,
end,
Expand Down
2 changes: 1 addition & 1 deletion lib/forwardanalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,6 @@ Analyzer::Result valueFlowGenericForward(Token* start, const ValuePtr<Analyzer>&
if (a->invalid())
return Analyzer::Result{Analyzer::Action::None, Analyzer::Terminate::Bail};
ForwardTraversal ft{a, tokenList, errorLogger, settings};
ft.updateRecursive(start);
(void)ft.updateRecursive(start);
return Analyzer::Result{ ft.actions, ft.terminate };
}
2 changes: 1 addition & 1 deletion lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3068,7 +3068,7 @@ struct ValueFlowAnalyzer : Analyzer {
if (d == Direction::Forward && a.isRead())
setTokenValue(tok, *value, getSettings());
if (a.isInconclusive())
lowerToInconclusive();
(void)lowerToInconclusive();
if (a.isWrite() && tok->astParent()) {
writeValue(value, tok, d);
}
Expand Down

0 comments on commit 6f2a06d

Please sign in to comment.