ros / roscpp_core

ros distribution sandbox
89 stars 116 forks source link

Unused parameter warnings prevent clean builds. #41

Closed aleeper closed 8 years ago

aleeper commented 8 years ago

message_traits.h has several unused parameter violations, for example here on line 171. All the offending lines are (171, 172, 190, 191, 210, 211).

For a project that wants to build with warnings-as-errors, this requires us to disable these warnings for any file that includes ROS messages, which is unfortunate.

I previously pushed to have the same issue fixed in dynamic reconfigure here. As you can see, the solution is just to comment out the parameter name when it's not used in a particular implementation. e.g.

static std_msgs::Header* pointer(M& /*m*/) { return 0; }
dirk-thomas commented 8 years ago

Please consider to provide a PR for this.