Fix minor issues (#7704)
authorGereon Kremer <gkremer@stanford.edu>
Mon, 29 Nov 2021 21:51:17 +0000 (13:51 -0800)
committerGitHub <noreply@github.com>
Mon, 29 Nov 2021 21:51:17 +0000 (21:51 +0000)
This fixes a few minor coverity issues.

src/theory/arith/theory_arith_private.cpp
src/util/resource_manager.cpp

index d4b84be01e8d7e893b87966ecc4889f859f9e393..643ba9a28bf103200d067d8f3c9aef5d719ff16c 100644 (file)
@@ -2530,12 +2530,9 @@ std::vector<ConstraintCPVec> TheoryArithPrivate::replayLogRec(ApproximateSimplex
       Assert(d_partialModel.canBeReleased(v));
       if(!d_tableau.isBasic(v)){
         /* if it is not basic make it basic. */
-        ArithVar b = ARITHVAR_SENTINEL;
-        for(Tableau::ColIterator ci = d_tableau.colIterator(v); !ci.atEnd(); ++ci){
-          const Tableau::Entry& e = *ci;
-          b = d_tableau.rowIndexToBasic(e.getRowIndex());
-          break;
-        }
+        auto ci = d_tableau.colIterator(v);
+        Assert(!ci.atEnd());
+        ArithVar b = d_tableau.rowIndexToBasic((*ci).getRowIndex());
         Assert(b != ARITHVAR_SENTINEL);
         DeltaRational cp = d_partialModel.getAssignment(b);
         if(d_partialModel.cmpAssignmentLowerBound(b) < 0){
index c4a94dfa2a91e01f7a7a9d30f7bf3e85b26fe99e..4a5be537c161d6ed81e8451eb2361eba028bae8f 100644 (file)
@@ -158,6 +158,7 @@ ResourceManager::ResourceManager(StatisticsRegistry& stats,
       d_cumulativeTimeUsed(0),
       d_cumulativeResourceUsed(0),
       d_thisCallResourceUsed(0),
+      d_thisCallResourceBudget(0),
       d_statistics(new ResourceManager::Statistics(stats))
 {
   d_statistics->d_resourceUnitsUsed.set(d_cumulativeResourceUsed);