Skip to content

Commit 2626e2e

Browse files
authored
mitigated Unchecked return value Coverity warnings (#5980)
1 parent 9f28644 commit 2626e2e

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/findtoken.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ std::vector<T*> findTokensSkipDeadCode(const Library* library,
176176
const Evaluate& evaluate)
177177
{
178178
std::vector<T*> result;
179-
findTokensSkipDeadCodeImpl(
179+
(void)findTokensSkipDeadCodeImpl(
180180
library,
181181
start,
182182
end,
@@ -199,7 +199,7 @@ template<class T, class Predicate, class Evaluate, REQUIRES("T must be a Token c
199199
T* findTokenSkipDeadCode(const Library* library, T* start, const Token* end, const Predicate& pred, const Evaluate& evaluate)
200200
{
201201
T* result = nullptr;
202-
findTokensSkipDeadCodeImpl(
202+
(void)findTokensSkipDeadCodeImpl(
203203
library,
204204
start,
205205
end,

lib/forwardanalyzer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,6 @@ Analyzer::Result valueFlowGenericForward(Token* start, const ValuePtr<Analyzer>&
922922
if (a->invalid())
923923
return Analyzer::Result{Analyzer::Action::None, Analyzer::Terminate::Bail};
924924
ForwardTraversal ft{a, tokenList, errorLogger, settings};
925-
ft.updateRecursive(start);
925+
(void)ft.updateRecursive(start);
926926
return Analyzer::Result{ ft.actions, ft.terminate };
927927
}

lib/valueflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3069,7 +3069,7 @@ struct ValueFlowAnalyzer : Analyzer {
30693069
if (d == Direction::Forward && a.isRead())
30703070
setTokenValue(tok, *value, getSettings());
30713071
if (a.isInconclusive())
3072-
lowerToInconclusive();
3072+
(void)lowerToInconclusive();
30733073
if (a.isWrite() && tok->astParent()) {
30743074
writeValue(value, tok, d);
30753075
}

0 commit comments

Comments
 (0)