gazebosim / gz-gui

Builds on top of Qt to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface.
https://gazebosim.org
Apache License 2.0
66 stars 39 forks source link

Fix compiler warnings #623

Closed Blast545 closed 1 month ago

Blast545 commented 1 month ago

Summary

Fixes the warnings present in main jobs of he buildfarm.

Reference build: https://build.osrfoundation.org/job/gz_gui-ci-main-noble-amd64/5/

There are two warnings being fixed:

  1. In MinimalScene plugin, if GZ_GUI_HAVE_VULKAN is not defined, the parameter _camera of the TextureNode constructor is not used. I added a void statement to suppress that warning.

  2. In ImageDisplay plugin tests, there are shared_pointers declared with an incompatible new/delete match. std::shared_ptr<unsigned char> buffer(new unsigned char[bufferSize]); Given that the shared pointer is not declared as an array, the tests leak memory as they are right now. I added a fix for all of those tests.

cc: @Crola1702

Checklist

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.

Blast545 commented 1 month ago

AFAIK, gz_gui-ci-pr_any-jammy-amd64 shouldn't be running on gui-main. Given that gz_gui-ci-pr_any-noble-amd64 is green, I will go ahead and merge this PR.

Edit: I can't merge because the check is set as "required" t-t