mirror of
https://github.com/boostorg/python.git
synced 2026-01-19 16:32:16 +00:00
avoid g++ -Wall -W "unused parameter" warnings
[SVN r32373]
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
struct error {};
|
||||
|
||||
void translate(error const& e)
|
||||
void translate(error const& /*e*/)
|
||||
{
|
||||
PyErr_SetString(PyExc_RuntimeError, "!!!error!!!");
|
||||
}
|
||||
|
||||
@@ -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&>(x_obj);
|
||||
assert(x.value() == 3);
|
||||
if (x.value() != 3) {
|
||||
throw std::runtime_error("x.value() == 3 failure.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ object new_array()
|
||||
}
|
||||
|
||||
// test argument conversion
|
||||
void take_array(numeric::array x)
|
||||
void take_array(numeric::array /*x*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user