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

ignore cast function type warning #116

Merged
merged 3 commits into from
May 9, 2019
Merged

Conversation

Karsten1987
Copy link
Collaborator

This fixes the warning shown in CentOS. According to https://docs.python.org/3/c-api/structures.html#c.PyMethodDef this cast is correct and necessary. Thus suppress the warning for this package.

CentOS CI: https://ci.ros2.org/job/ci_linux-centos/7/
Warning is unrelated

Signed-off-by: Karsten Knese karsten@openrobotics.org

@Karsten1987 Karsten1987 self-assigned this May 8, 2019
@Karsten1987 Karsten1987 requested a review from cottsay May 8, 2019 22:35
@dirk-thomas
Copy link
Member

Can't this be done with a more narrow scope?

@Karsten1987
Copy link
Collaborator Author

narrowed done to the specific lines of code. Using the diagnostics pragma to ignore the warnings.
new CentOS CI here:
Build Status

@@ -170,6 +173,8 @@ static PyMethodDef rosbag2_transport_methods[] = {
},
{nullptr, nullptr, 0, nullptr} /* sentinel */
};
# pragma GCC diagnostic pop
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inner block should still be used on non-Windows platforms, no? Currently the ifdef wraps all of it - you probably want to endif after line 160 and ifdef again before line 176.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

absolutely! Corrected in 928a4ee

Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
@Karsten1987 Karsten1987 force-pushed the no_cast_function_type_warning branch from 656e128 to 928a4ee Compare May 9, 2019 00:53
@Karsten1987 Karsten1987 merged commit caaf799 into master May 9, 2019
@Karsten1987 Karsten1987 deleted the no_cast_function_type_warning branch May 9, 2019 02:43
@dirk-thomas
Copy link
Member

Have you tried building this on Linux? It seems it fails in the latest release: http://build.ros2.org/view/Dbin_uB64/job/Dbin_uB64__rosbag2_transport__ubuntu_bionic_amd64__binary/1/

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

Successfully merging this pull request may close these issues.

3 participants