From 13775fae6feff9ad7c94d54adbe1443d92d0b1fb Mon Sep 17 00:00:00 2001 From: Jorge Perez Date: Mon, 3 Jun 2024 16:02:12 -0300 Subject: [PATCH] Fix compiler warnings (#623) Signed-off-by: Jorge J. Perez --- src/plugins/image_display/ImageDisplay_TEST.cc | 6 +++--- src/plugins/minimal_scene/MinimalScene.cc | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/image_display/ImageDisplay_TEST.cc b/src/plugins/image_display/ImageDisplay_TEST.cc index 4d75636f4..3e7f1082f 100644 --- a/src/plugins/image_display/ImageDisplay_TEST.cc +++ b/src/plugins/image_display/ImageDisplay_TEST.cc @@ -269,7 +269,7 @@ TEST(ImageDisplayTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(ReceiveImage)) // red image int bufferSize = msg.width() * msg.height() * bpp; - std::shared_ptr buffer(new unsigned char[bufferSize]); + std::shared_ptr buffer(new unsigned char[bufferSize]); for (int i = 0; i < bufferSize; i += bpp) { buffer.get()[i] = 255u; @@ -371,7 +371,7 @@ TEST(ImageDisplayTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(ReceiveImageFloat32)) // first half is gray, second half is black int bufferSize = msg.width() * msg.height() * bpp; - std::shared_ptr buffer(new float[bufferSize]); + std::shared_ptr buffer(new float[bufferSize]); for (unsigned int y = 0; y < msg.width(); ++y) { float v = 0.5f * static_cast(y / (msg.height() / 2.0) + 1); @@ -485,7 +485,7 @@ TEST(ImageDisplayTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(ReceiveImageInt16)) // first half is black, second half is white int bufferSize = msg.width() * msg.height() * bpp; - std::shared_ptr buffer(new uint16_t[bufferSize]); + std::shared_ptr buffer(new uint16_t[bufferSize]); for (unsigned int y = 0; y < msg.width(); ++y) { uint16_t v = 100 * static_cast(y / (msg.height() / 2.0) + 1); diff --git a/src/plugins/minimal_scene/MinimalScene.cc b/src/plugins/minimal_scene/MinimalScene.cc index 613fc6878..2405b56d2 100644 --- a/src/plugins/minimal_scene/MinimalScene.cc +++ b/src/plugins/minimal_scene/MinimalScene.cc @@ -1014,6 +1014,7 @@ TextureNode::TextureNode(QQuickWindow *_window, RenderSync &_renderSync, renderSync(_renderSync), window(_window) { + (void) _camera; if (_graphicsAPI == rendering::GraphicsAPI::OPENGL) { gzdbg << "Creating texture node render interface for OpenGL" << std::endl;