Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actionlib fails compilation with stricter GCC options #49

Open
sytelus opened this issue May 21, 2016 · 3 comments
Open

actionlib fails compilation with stricter GCC options #49

sytelus opened this issue May 21, 2016 · 3 comments
Labels
Milestone

Comments

@sytelus
Copy link

sytelus commented May 21, 2016

It looks like some of the actionlib uses unnecessary ";" which GCC correctly points out with stricter options. For example,

/opt/ros/indigo/include/actionlib/action_definition.h:58:2: error: extra ‘;’ [-Werror=pedantic]
/opt/ros/indigo/include/actionlib/destruction_guard.h:126:2: error: extra ‘;’ [-Werror=pedantic]
/opt/ros/indigo/include/actionlib_msgs/GoalID.h:177:36: error: extra ‘;’ [-Werror=pedantic]
/opt/ros/indigo/include/std_msgs/Header.h:188:36: error: extra ‘;’ [-Werror=pedantic]
/opt/ros/indigo/include/actionlib_msgs/GoalStatus.h:240:36: error: extra ‘;’ [-Werror=pedantic]

To reproduce these errors turn on checks in GCC using following line in CMakeLists.txt:

set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wextra -Wstrict-aliasing -pedantic -fmax-errors=5 -Werror -Wunreachable-code ${CMAKE_CXX_FLAGS}")

@mikaelarguedas
Copy link
Member

Indeed a lot of semicolons in the codebase are not necessary. Feel free to submit a pull request to address these in actionlib or any other package you want to compile with the -pedantic flag.
Thanks for pointing it out.

@mikaelarguedas mikaelarguedas added this to the untargeted milestone Aug 25, 2016
@mikaelarguedas
Copy link
Member

marking this with milestone untargeted given that we don't target these flags on ROS1 packages. We will still happily merge code cleaning pull requests

@remod
Copy link

remod commented Apr 30, 2019

Addressed in #135.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants