[ros-users] GCC no-unused-parameter & generated headers

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: ros-users
Subject: [ros-users] GCC no-unused-parameter & generated headers
Hi,
Compiling ROS generated headers (eg from an actionlib or client message)
cause a lot of long GCC no-unused-parameters warnings.
Eg:
/opt/ros/diamondback/stacks/common_msgs/actionlib_msgs/msg_gen/cpp/include/actionlib_msgs/GoalStatus.h:114:
warning: unused parameter ‘seq’
In file included from
/opt/ros/diamondback/stacks/common/actionlib/include/actionlib/server/action_server.h:44,
                 from
/opt/ros/diamondback/stacks/common/actionlib/include/actionlib/server/simple_action_server.h:43,
                 from
/opt/ros/diamondback/stacks/common_tutorials/actionlib_tutorials/simple_action_servers/fibonacci_server.cpp:39:
/opt/ros/diamondback/stacks/common_msgs/actionlib_msgs/msg_gen/cpp/include/actionlib_msgs/GoalID.h:
In instantiation of ‘uint8_t * actionlib_msgs::GoalID_<std::allocator<void>

>::serialize(uint8_t *, uint32_t) const’:



These warnings are hidden when building with rosmake with
-Wno-unused-parameter, but our internal QA policy defines that this warning
should not be hidden.
I've tried hiding it with a c++ pragma around the headers include , but it
does not work because the templates compilation occurs when the class is
instantiated.
Would it be possible in future ROS versions that the generated headers do
not include unused arguments?

thanks

--
Daniel Pinyol
Software Manager
Pal Robotics S.L.

Tel: +34.93.414.53.47
Fax: +34.93.209.11.09
C/ Pujades 77-79 4º 4ª 08005 Barcelona, Spain.
http://www.pal-robotics.com/