diff --git a/gtsam/nonlinear/LevenbergMarquardtOptimizer.cpp b/gtsam/nonlinear/LevenbergMarquardtOptimizer.cpp index 2cde6768f..08961db86 100644 --- a/gtsam/nonlinear/LevenbergMarquardtOptimizer.cpp +++ b/gtsam/nonlinear/LevenbergMarquardtOptimizer.cpp @@ -244,7 +244,7 @@ void LevenbergMarquardtOptimizer::iterate() { try { delta = solve(dampedSystem, state_.values, params_); systemSolvedSuccessfully = true; - } catch (IndeterminantLinearSystemException& e) { + } catch (IndeterminantLinearSystemException) { systemSolvedSuccessfully = false; } diff --git a/gtsam/slam/SmartFactorBase.h b/gtsam/slam/SmartFactorBase.h index 93931549f..1235fc6fb 100644 --- a/gtsam/slam/SmartFactorBase.h +++ b/gtsam/slam/SmartFactorBase.h @@ -325,7 +325,7 @@ public: const Cameras& cameras, const Point3& point, const double lambda = 0.0) const { - int numKeys = this->keys_.size(); + size_t numKeys = this->keys_.size(); std::vector Fblocks; double f = computeJacobians(Fblocks, E, PointCov, b, cameras, point, lambda); @@ -352,7 +352,7 @@ public: Eigen::JacobiSVD svd(E, Eigen::ComputeFullU); Vector s = svd.singularValues(); // Enull = zeros(2 * numKeys, 2 * numKeys - 3); - int numKeys = this->keys_.size(); + size_t numKeys = this->keys_.size(); Enull = svd.matrixU().block(0, 3, 2 * numKeys, 2 * numKeys - 3); // last 2m-3 columns return f; diff --git a/gtsam/slam/SmartProjectionFactor.h b/gtsam/slam/SmartProjectionFactor.h index 7c3719cd8..043528fea 100644 --- a/gtsam/slam/SmartProjectionFactor.h +++ b/gtsam/slam/SmartProjectionFactor.h @@ -262,7 +262,7 @@ public: try { Point2 reprojectionError(camera.project(point_) - zi); totalReprojError += reprojectionError.vector().norm(); - } catch (CheiralityException& e) { + } catch (CheiralityException) { cheiralityException_ = true; } i += 1; diff --git a/wrap/FileWriter.cpp b/wrap/FileWriter.cpp index c5e64614e..3f5461078 100644 --- a/wrap/FileWriter.cpp +++ b/wrap/FileWriter.cpp @@ -28,7 +28,7 @@ void FileWriter::emit(bool add_header, bool force_overwrite) const { bool file_exists = true; try { existing_contents = file_contents(filename_.c_str(), add_header); - } catch (CantOpenFile& e) { + } catch (CantOpenFile) { file_exists = false; }