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

Fix cpplint errors #221

Merged
merged 1 commit into from
Jan 12, 2022
Merged

Fix cpplint errors #221

merged 1 commit into from
Jan 12, 2022

Conversation

jacobperron
Copy link
Contributor

@@ -148,7 +151,7 @@ std::string PublicationServer::getService() const

PublicationServer::operator void*() const
{
return (impl_ && impl_->isValid()) ? (void*)1 : (void*)0;
return (impl_ && impl_->isValid()) ? reinterpret_cast<void*>(1) : reinterpret_cast<void*>(0);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Orthogonal to resolving the linter complaint, does anyone have an idea as to why we would want to return a bogus pointer here in case the implementation is valid?

Copy link
Contributor

Choose a reason for hiding this comment

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

That looks like a recipe for segfaults, to me. It must be being treated as an error code of some kind, I guess?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since this package hasn't been ported to ROS 2, I've dropped changes to it in this PR.

@jacobperron
Copy link
Contributor Author

I realized I applied linter fixes to files in the polled_camera package, but the package has not been ported to ROS 2 yet. Since pollled_camera is currently being ignored, I could not include lint fixes for it in this PR. Thoughts?

Copy link
Contributor

@gbiggs gbiggs left a comment

Choose a reason for hiding this comment

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

LGTM

@gbiggs
Copy link
Contributor

gbiggs commented Jan 12, 2022

I realized I applied linter fixes to files in the polled_camera package, but the package has not been ported to ROS 2 yet. Since pollled_camera is currently being ignored, I could not include lint fixes for it in this PR. Thoughts?

If it's not ported to ROS 2 and is not being built, then I think it's OK to skip the ROS 2 lint fixes.

@gbiggs
Copy link
Contributor

gbiggs commented Jan 12, 2022

CI:

  • Linux Build Status
  • Linux (aarch64) Build Status
  • Windows Build Status

Relates to ament/ament_lint#324

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron jacobperron force-pushed the jacob/update_cpplint_fork branch from da4de90 to 121f6ed Compare January 12, 2022 01:30
@jacobperron
Copy link
Contributor Author

I've dropped all changes to the polled_camera package. Now there's just one commit to review (121f6ed).

@jacobperron jacobperron merged commit 467fef0 into ros2 Jan 12, 2022
@jacobperron jacobperron deleted the jacob/update_cpplint_fork branch January 12, 2022 22:26
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.

2 participants