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 compiler warnings in GCC-13 (Noble) #616

Merged
merged 2 commits into from
Apr 10, 2024
Merged

Conversation

j-rivero
Copy link
Contributor

🦟 Bug fix

Summary

GCC-13 is complaining about "pointers returned from a mismatched allocation function" in the UNIT_ImageDisplay_TEST. There are 3 occurences where a shared pointer is created from a simple
type while the object handled is really a C array. The commit changes the type to indicate that it is in fact
an array.

Failing https://build.osrfoundation.org/job/gz_gui-ci-gz-gui8-noble-amd64/2/

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

GCC-13 is complaining about "pointers returned from a mismatched
allocation function" in the UNIT_ImageDisplay_TEST. There are
3 occurences where a shared pointer is created from a simple
type while the object handled is really a C array.

The commit changes the type to indicate that it is in fact
an array.

Signed-off-by: Jose Luis Rivero <[email protected]>
@j-rivero j-rivero requested a review from jennuine as a code owner April 10, 2024 17:59
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Apr 10, 2024
Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

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

another additional optimization is to use std::make_shared instead of new, but this looks good to me

@azeey azeey merged commit a4710e9 into gz-gui8 Apr 10, 2024
8 checks passed
@azeey azeey deleted the jrivero/fix_noble_warning branch April 10, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants