diff --git a/tools/python/src/basic.cpp b/tools/python/src/basic.cpp index 960563501..26492df2d 100644 --- a/tools/python/src/basic.cpp +++ b/tools/python/src/basic.cpp @@ -19,7 +19,7 @@ std::shared_ptr > array_from_object(py::object obj) try { long nr = obj.cast(); return std::make_shared>(nr); - } catch (py::cast_error &e) { + } catch (py::cast_error&) { py::list li = obj.cast(); const long nr = len(li); auto temp = std::make_shared>(nr); diff --git a/tools/python/src/svm_struct.cpp b/tools/python/src/svm_struct.cpp index d8ebad957..f85debfbb 100644 --- a/tools/python/src/svm_struct.cpp +++ b/tools/python/src/svm_struct.cpp @@ -56,7 +56,7 @@ public: try { loss = t[0].cast(); psi = t[1].cast(); - } catch(py::cast_error &e) { + } catch(py::cast_error&) { psi = t[0].cast(); loss = t[1].cast(); } diff --git a/tools/python/src/vector.cpp b/tools/python/src/vector.cpp index 3b77c7da1..ff6f8bc58 100644 --- a/tools/python/src/vector.cpp +++ b/tools/python/src/vector.cpp @@ -59,7 +59,7 @@ std::shared_ptr cv_from_object(py::object obj) auto temp = std::make_shared(nr); *temp = 0; return temp; - } catch(py::cast_error &e) { + } catch(py::cast_error&) { py::list li = obj.cast(); const long nr = len(obj); auto temp = std::make_shared(nr);