Skip to content

Commit

Permalink
mitigated Unchecked return value Coverity warnings (#5980)
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave authored Apr 2, 2024
1 parent 9f28644 commit 2626e2e
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 @@ -3069,7 +3069,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 2626e2e

Please sign in to comment.