Skip to content

Fix cpplint errors#221

Merged
jacobperron merged 1 commit intoros2from
jacob/update_cpplint_fork
Jan 12, 2022
Merged

Fix cpplint errors#221
jacobperron merged 1 commit intoros2from
jacob/update_cpplint_fork

Conversation

@jacobperron
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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