diff --git a/test/back_reference.cpp b/test/back_reference.cpp index 98f79e50..c3c09e11 100644 --- a/test/back_reference.cpp +++ b/test/back_reference.cpp @@ -41,8 +41,8 @@ int X::counter; struct Y : X { - Y(PyObject* self, int x) : X(x) {}; - Y(PyObject* self, Y const& rhs) : X(rhs), self(self) {}; + Y(PyObject* self, int x) : X(x), self(self) {} + Y(PyObject* self, Y const& rhs) : X(rhs), self(self) {} private: Y(Y const&); PyObject* self; @@ -50,8 +50,8 @@ struct Y : X struct Z : X { - Z(PyObject* self, int x) : X(x) {}; - Z(PyObject* self, Z const& rhs) : X(rhs), self(self) {}; + Z(PyObject* self, int x) : X(x), self(self) {} + Z(PyObject* self, Z const& rhs) : X(rhs), self(self) {} private: Z(Z const&); PyObject* self; diff --git a/test/cltree.cpp b/test/cltree.cpp index 4ebfb535..518ae37f 100755 --- a/test/cltree.cpp +++ b/test/cltree.cpp @@ -36,20 +36,20 @@ public: class symbol_wrapper: public symbol { public: - symbol_wrapper(PyObject* self): symbol() { + symbol_wrapper(PyObject* /*self*/): symbol() { name = "cltree.wrapped_symbol"; } }; class variable_wrapper: public variable { public: - variable_wrapper(PyObject* self): variable() { + variable_wrapper(PyObject* /*self*/): variable() { name = "cltree.wrapped_variable"; } // This constructor is introduced only because cannot use // boost::noncopyable, see below. - variable_wrapper(PyObject* self,variable v): variable(v) {} + variable_wrapper(PyObject* /*self*/,variable v): variable(v) {} }; diff --git a/test/exception_translator.cpp b/test/exception_translator.cpp index 741689a8..1e91c929 100644 --- a/test/exception_translator.cpp +++ b/test/exception_translator.cpp @@ -7,7 +7,7 @@ struct error {}; -void translate(error const& e) +void translate(error const& /*e*/) { PyErr_SetString(PyExc_RuntimeError, "!!!error!!!"); } diff --git a/test/extract.cpp b/test/extract.cpp index f9c2232c..91c90f8e 100644 --- a/test/extract.cpp +++ b/test/extract.cpp @@ -29,8 +29,9 @@ boost::python::list extract_list(object x) // Make sure we always have the right idea about whether it's a list bool is_list_1 = get_list.check(); bool is_list_2 = PyObject_IsInstance(x.ptr(), (PyObject*)&PyList_Type); - assert(is_list_1 == is_list_2); - + if (is_list_1 != is_list_2) { + throw std::runtime_error("is_list_1 == is_list_2 failure."); + } return get_list(); } @@ -131,7 +132,9 @@ BOOST_PYTHON_MODULE(extract_ext) // Get the C++ object out of the Python object X const& x = extract(x_obj); - assert(x.value() == 3); + if (x.value() != 3) { + throw std::runtime_error("x.value() == 3 failure."); + } } diff --git a/test/numpy.cpp b/test/numpy.cpp index 779858f1..4c7f0a12 100644 --- a/test/numpy.cpp +++ b/test/numpy.cpp @@ -23,7 +23,7 @@ object new_array() } // test argument conversion -void take_array(numeric::array x) +void take_array(numeric::array /*x*/) { }