Hello, I am worried about the following warning that is given when compiling roscpp programs which contains a publisher:
/opt/ros/groovy/include/ros/publisher.h: In member function ‘void ros::Publisher::publish(const M&) const [with M = geometry_msgs::PoseStamped]’:
/opt/ros/groovy/include/ros/publisher.h:112: warning: comparison with string literal results in unspecified behaviour
The publisher:
ros::Publisher goalPub = this->n.advertise<geometry_msgs::PoseStamped>("move_base_simple/goal", 1);
geometry_msgs::PoseStamped msg;
msg.header.frame_id = "/map";
msg.header.stamp = ros::Time::now();
msg.pose.position.x=mygoal.x;
msg.pose.position.y=mygoal.y;
msg.pose.orientation=tf::createQuaternionMsgFromYaw(angle);
goalPub.publish(msg);
But the warning is given for all the publishers:
ros::Publisher cmdPub = this->n.advertise<geometry_msgs::Twist>("cmd_vel", 1);
cmdPub.publish(msg);
My machine is ubuntu 12.10 with the latest version of ros-groovy and gcc 4.4.7.
Is this warning dangeours? is it being adresses? is it considered a 'bug'? if so, where can I open a ticket for it?
Originally posted by Victor_ocv2 on ROS Answers with karma: 483 on 2013-02-01
Post score: 0
Original comments
Comment by joq on 2013-02-01:
Would you please add the code invoking publish()
, by editing your question?
Comment by dornhege on 2013-02-01:
It might be that the compile gets more verbose about warnings with later versions, but are you sure you are using 4.4.7? On Oneiric I already have 4.6.1.
Comment by Victor_ocv2 on 2013-02-01:
Yes, I had to downgrade to able to compile something... (CUDA maybe?)