From d38bac596946c3dd9cce3c0b4127509421dc917d Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 11 Sep 2019 14:29:51 +0200 Subject: Fix gcc warnings in vulkanunderqml example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iea81662f39d2a128cea0e83a766395e0fb1e9896 Reviewed-by: Christian Strømme --- examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/quick') diff --git a/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp b/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp index 59e9606e7b..6e24391257 100644 --- a/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp +++ b/examples/quick/scenegraph/vulkanunderqml/vulkansquircle.cpp @@ -362,13 +362,13 @@ void SquircleRenderer::init(int framesInFlight) } } } - if (memTypeIndex < 0) + if (memTypeIndex == uint32_t(-1)) qFatal("Failed to find host visible and coherent memory type"); allocInfo.memoryTypeIndex = memTypeIndex; err = m_devFuncs->vkAllocateMemory(m_dev, &allocInfo, nullptr, &m_vbufMem); if (err != VK_SUCCESS) - qFatal("Failed to allocate vertex buffer memory of size %llu: %d", allocInfo.allocationSize, err); + qFatal("Failed to allocate vertex buffer memory of size %u: %d", uint(allocInfo.allocationSize), err); void *p = nullptr; err = m_devFuncs->vkMapMemory(m_dev, m_vbufMem, 0, allocInfo.allocationSize, 0, &p); @@ -412,14 +412,14 @@ void SquircleRenderer::init(int framesInFlight) } } } - if (memTypeIndex < 0) + if (memTypeIndex == uint32_t(-1)) qFatal("Failed to find host visible and coherent memory type"); allocInfo.allocationSize = framesInFlight * m_allocPerUbuf; allocInfo.memoryTypeIndex = memTypeIndex; err = m_devFuncs->vkAllocateMemory(m_dev, &allocInfo, nullptr, &m_ubufMem); if (err != VK_SUCCESS) - qFatal("Failed to allocate uniform buffer memory of size %llu: %d", allocInfo.allocationSize, err); + qFatal("Failed to allocate uniform buffer memory of size %u: %d", uint(allocInfo.allocationSize), err); err = m_devFuncs->vkBindBufferMemory(m_dev, m_ubuf, m_ubufMem, 0); if (err != VK_SUCCESS) -- cgit v1.2.3