diff --git a/gtsam/nonlinear/ISAM2-impl.cpp b/gtsam/nonlinear/ISAM2-impl.cpp index 9abd62016..ffdbd6d10 100644 --- a/gtsam/nonlinear/ISAM2-impl.cpp +++ b/gtsam/nonlinear/ISAM2-impl.cpp @@ -116,7 +116,10 @@ void ISAM2::Impl::RemoveVariables(const FastSet& unusedKeys, const ISAM2Cli // Reorder and remove from ordering, solution, and fixed keys ordering.permuteInPlace(unusedToEnd); BOOST_REVERSE_FOREACH(Key key, unusedKeys) { - Ordering::value_type removed = ordering.pop_back(); +#ifndef NDEBUG + Ordering::value_type removed = +#endif + ordering.pop_back(); assert(removed.first == key); theta.erase(key); fixedVariables.erase(key); diff --git a/gtsam_unstable/nonlinear/ConcurrentBatchSmoother.cpp b/gtsam_unstable/nonlinear/ConcurrentBatchSmoother.cpp index d9c59d0ea..bc3e591f9 100644 --- a/gtsam_unstable/nonlinear/ConcurrentBatchSmoother.cpp +++ b/gtsam_unstable/nonlinear/ConcurrentBatchSmoother.cpp @@ -266,7 +266,6 @@ ConcurrentBatchSmoother::Result ConcurrentBatchSmoother::optimize() { result.linearVariables = separatorValues_.size(); // Pull out parameters we'll use - const NonlinearOptimizerParams::Verbosity nloVerbosity = parameters_.verbosity; const LevenbergMarquardtParams::VerbosityLM lmVerbosity = parameters_.verbosityLM; double lambda = parameters_.lambdaInitial;