Skip to content

Commit

Permalink
Fix compiler warnings (#623)
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
  • Loading branch information
Blast545 authored Jun 3, 2024
1 parent aad19ea commit 13775fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins/image_display/ImageDisplay_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned char> buffer(new unsigned char[bufferSize]);
std::shared_ptr<unsigned char[]> buffer(new unsigned char[bufferSize]);
for (int i = 0; i < bufferSize; i += bpp)
{
buffer.get()[i] = 255u;
Expand Down Expand Up @@ -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<float> buffer(new float[bufferSize]);
std::shared_ptr<float[]> buffer(new float[bufferSize]);
for (unsigned int y = 0; y < msg.width(); ++y)
{
float v = 0.5f * static_cast<int>(y / (msg.height() / 2.0) + 1);
Expand Down Expand Up @@ -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<uint16_t> buffer(new uint16_t[bufferSize]);
std::shared_ptr<uint16_t[]> buffer(new uint16_t[bufferSize]);
for (unsigned int y = 0; y < msg.width(); ++y)
{
uint16_t v = 100 * static_cast<int>(y / (msg.height() / 2.0) + 1);
Expand Down
1 change: 1 addition & 0 deletions src/plugins/minimal_scene/MinimalScene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 13775fa

Please sign in to comment.