compiler warning: parameter passing for argument X changed in GCC 7.1 (ARM)
Hi, I'm getting a few of the following warning when compiling a node using geometry_msgs::Twist
. Any idea what I'm doing wrong and how to get rid of it?
EDIT: Updated warning to match the source code below.
In file included from /usr/include/boost/bind.hpp:22:0,
from /opt/ros/melodic/include/ros/publisher.h:35,
from /opt/ros/melodic/include/ros/node_handle.h:32,
from /opt/ros/melodic/include/ros/ros.h:45,
from /home/odroid/marionette-ros/src/marionette_control/src/trx2_node.cpp:1:
/usr/include/boost/bind/bind.hpp: In constructor 'boost::_bi::list1<A1>::list1(A1) [with A1 = boost::reference_wrapper<const geometry_msgs::Twist_<std::allocator<void> > >]':
/usr/include/boost/bind/bind.hpp:231:14: note: parameter passing for argument of type 'boost::reference_wrapper<const geometry_msgs::Twist_<std::allocator<void> > >' changed in GCC 7.1
explicit list1( A1 a1 ): base_type( a1 ) {}
^~~~~
I get multiple warnings like this, the last line being different. Further examples:
[...]
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1), A1 a1)
[...]
return _bi::bind_t<R, F, list_type> (f, list_type(a1));
[...]
explicit storage1( A1 a1 ): a1_( a1 ) {}
I use melodic on Ubuntu 18.04.5 on an Odroid (ARM). My compiler version:
$ gcc --version
gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
EDIT: Stripped down source code to reproduce the issue:
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
int main (int argc, char** argv)
{
ros::init(argc, argv, "trx2_node");
ros::NodeHandle nh("~");
ros::Publisher pub_twist;
pub_twist = nh.advertise<geometry_msgs::Twist>("odom_vel", 10);
geometry_msgs::Twist t;
pub_twist.publish(t);
ros::Rate rate(100);
while (ros::ok())
{
rate.sleep();
}
}
we most certainly can't if you don't show us the relevant code. Please edit your question and add the source code of your
trx_node.cpp
(or at least the relevant parts...@mgruhler Thanks for your comment. I've updated my post with more information. Let me know what else to add to make it more useful.