Skip to content

Commit

Permalink
ignore cast function type warning (ros2#116)
Browse files Browse the repository at this point in the history
* ignore cast function type warning

Signed-off-by: Karsten Knese <[email protected]>

* use pragma to ignore warning on specific lines of code

Signed-off-by: Karsten Knese <[email protected]>

* correctly branch the pragma

Signed-off-by: Karsten Knese <[email protected]>
  • Loading branch information
Karsten1987 authored May 9, 2019
1 parent 4ed31a0 commit caaf799
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ rosbag2_transport_info(PyObject * Py_UNUSED(self), PyObject * args, PyObject * k
}

/// Define the public methods of this module
#if !defined(_WIN32)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wcast-function-type"
#endif
static PyMethodDef rosbag2_transport_methods[] = {
{
"record", reinterpret_cast<PyCFunction>(rosbag2_transport_record), METH_VARARGS | METH_KEYWORDS,
Expand All @@ -170,6 +174,9 @@ static PyMethodDef rosbag2_transport_methods[] = {
},
{nullptr, nullptr, 0, nullptr} /* sentinel */
};
#if !defined(_WIN32)
# pragma GCC diagnostic pop
#endif

PyDoc_STRVAR(rosbag2_transport__doc__,
"Python module for rosbag2 transport");
Expand Down

0 comments on commit caaf799

Please sign in to comment.