diff --git a/python/src/core/contractors/codac2_py_CtcDeriv.cpp b/python/src/core/contractors/codac2_py_CtcDeriv.cpp index b67a504b1..45ca04137 100644 --- a/python/src/core/contractors/codac2_py_CtcDeriv.cpp +++ b/python/src/core/contractors/codac2_py_CtcDeriv.cpp @@ -27,7 +27,12 @@ void export_contract(py::class_& exported) exported .def("contract", - [](const CtcDeriv& ctc, Slice& x, const Slice& v, const std::vector& ctc_indices) + // ctc_indices is read only by the if constexpr branch taken for + // IntervalVector; in the Interval instantiation that branch is + // discarded and the parameter goes unread, which MSVC /W4 reports as + // C4100. It cannot be dropped -- pybind11 takes the Python signature + // from this lambda, and the argument is exposed just below. + [](const CtcDeriv& ctc, Slice& x, const Slice& v, [[maybe_unused]] const std::vector& ctc_indices) -> py::tuple { if constexpr(std::is_same_v) @@ -44,7 +49,9 @@ void export_contract(py::class_& exported) "x"_a, "v"_a, "ctc_indices"_a = std::vector()) .def("contract", - [](const CtcDeriv& ctc, SlicedTube& x, const SlicedTube& v, const std::vector& ctc_indices) + // Same as above: unread in the Interval instantiation, kept for the + // Python signature. + [](const CtcDeriv& ctc, SlicedTube& x, const SlicedTube& v, [[maybe_unused]] const std::vector& ctc_indices) -> py::tuple { if constexpr(std::is_same_v) diff --git a/src/graphics/styles/codac2_StylePropertiesBase.cpp b/src/graphics/styles/codac2_StylePropertiesBase.cpp index 07552fd8c..76e66240b 100644 --- a/src/graphics/styles/codac2_StylePropertiesBase.cpp +++ b/src/graphics/styles/codac2_StylePropertiesBase.cpp @@ -7,6 +7,7 @@ * \license GNU Lesser General Public License (LGPL) */ +#include #include "codac2_StylePropertiesBase.h" using namespace std; @@ -35,6 +36,7 @@ void StylePropertiesBase::parse_parameter(const std::string& param) } catch (const std::invalid_argument& e) { + std::cerr << "codac2: invalid line width value \"" << param.substr(2) << "\": " << e.what() << std::endl; assert_release_constexpr(false && "Invalid line width value"); } } @@ -47,6 +49,7 @@ void StylePropertiesBase::parse_parameter(const std::string& param) } catch (const std::invalid_argument& e) { + std::cerr << "codac2: invalid z-value \"" << param.substr(2) << "\": " << e.what() << std::endl; assert_release_constexpr(false && "Invalid z-value"); } }