From 6f2a06dd764721fea0459109a5424eea9412bc7a Mon Sep 17 00:00:00 2001 From: firewave Date: Tue, 13 Feb 2024 00:45:27 +0100 Subject: [PATCH] mitigated `Unchecked return value` Coverity warnings --- lib/findtoken.h | 4 ++-- lib/forwardanalyzer.cpp | 2 +- lib/valueflow.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/findtoken.h b/lib/findtoken.h index 1210bea6774..d3404758b16 100644 --- a/lib/findtoken.h +++ b/lib/findtoken.h @@ -176,7 +176,7 @@ std::vector findTokensSkipDeadCode(const Library* library, const Evaluate& evaluate) { std::vector result; - findTokensSkipDeadCodeImpl( + (void)findTokensSkipDeadCodeImpl( library, start, end, @@ -199,7 +199,7 @@ template& 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 }; } diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 062dfcc868e..d9c434961c1 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -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); }