diff --git a/include/ungar/autodiff/function.hpp b/include/ungar/autodiff/function.hpp index a469425..ce0cb82 100644 --- a/include/ungar/autodiff/function.hpp +++ b/include/ungar/autodiff/function.hpp @@ -114,7 +114,7 @@ class Function { // clang-format on _jacobianInnerStarts.emplace_back(0); for (int i = 0; const int j : enumerate(static_cast(_dependentVariableSize))) { if (i < static_cast(_nnzJacobian)) { - while (i < _nnzJacobian && rows[i] == j) { + while (i < static_cast(_nnzJacobian) && rows[i] == j) { ++i; } _jacobianInnerStarts.emplace_back(i); @@ -408,7 +408,7 @@ class FunctionFactory { UNGAR_LOG(info, "Removing internal model folder {}...", - _internalLibrary.parent_path().parent_path()); + _internalLibrary.parent_path().parent_path().c_str()); std::filesystem::remove_all(_internalLibrary.parent_path().parent_path()); UNGAR_LOG(info, "Success."); @@ -492,18 +492,18 @@ class FunctionFactory { libraryCSourceGen, (tmpLibrary.parent_path() / tmpLibrary.stem()).string()}; SetCompilerOptions(library.parent_path(), gccCompiler); - UNGAR_LOG(info, "Compiling shared library {}...", tmpLibrary); + UNGAR_LOG(info, "Compiling shared library {}...", tmpLibrary.c_str()); _dynamicLib = libraryProcessor.createDynamicLibrary(gccCompiler); _model = _dynamicLib->model(modelName); UNGAR_ASSERT(_dynamicLib); UNGAR_ASSERT(_model); - UNGAR_LOG(info, "Renaming {} to {}...", tmpLibrary, library); + UNGAR_LOG(info, "Renaming {} to {}...", tmpLibrary.c_str(), library.c_str()); std::filesystem::rename(tmpLibrary, library); } void LoadModel() { - UNGAR_LOG(info, "Loading shared library {}...", _library); + UNGAR_LOG(info, "Loading shared library {}...", _library.c_str()); _dynamicLib.reset(new CppAD::cg::LinuxDynamicLib(_library)); _model = _dynamicLib->model(_blueprint.name); diff --git a/include/ungar/optimization/soft_sqp.hpp b/include/ungar/optimization/soft_sqp.hpp index b7ab763..0629f08 100644 --- a/include/ungar/optimization/soft_sqp.hpp +++ b/include/ungar/optimization/soft_sqp.hpp @@ -63,7 +63,7 @@ class SoftSQPOptimizer { VectorXr xpHelper = xp; _cache.xp = xp; - for (const auto i : enumerate(_maxIterations)) { + for ([[maybe_unused]] const auto i : enumerate(_maxIterations)) { if (_osqpSettings.verbose) { UNGAR_LOG(trace, "Starting soft SQP iteration {}...", i); }