Fix compiler warnings in test_vulkan (#2474)

Use the correct print format specifiers for `uint64_t` and fix loop
index type to address sign warning.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
This commit is contained in:
Ahmed Hesham
2025-08-07 15:12:27 +01:00
committed by GitHub
parent e2580bded2
commit ac63117231
4 changed files with 7 additions and 4 deletions

View File

@@ -29,6 +29,7 @@
#include <vector> #include <vector>
#include <iostream> #include <iostream>
#include <string.h> #include <string.h>
#include <inttypes.h>
#include "harness/testHarness.h" #include "harness/testHarness.h"
#include "harness/typeWrappers.h" #include "harness/typeWrappers.h"
#include "harness/deviceInfo.h" #include "harness/deviceInfo.h"
@@ -236,7 +237,7 @@ struct ConsistencyExternalImageTest : public VulkanTestBase
log_info("Memory type index: %u\n", (uint32_t)memoryTypeList[0]); log_info("Memory type index: %u\n", (uint32_t)memoryTypeList[0]);
log_info("Memory type property: %d\n", log_info("Memory type property: %d\n",
memoryTypeList[0].getMemoryTypeProperty()); memoryTypeList[0].getMemoryTypeProperty());
log_info("Image size : %ld\n", vkImage2D.getSize()); log_info("Image size : %" PRIu64 "\n", vkImage2D.getSize());
VulkanDeviceMemory* vkDeviceMem = VulkanDeviceMemory* vkDeviceMem =
new VulkanDeviceMemory(*vkDevice, vkImage2D, memoryTypeList[0], new VulkanDeviceMemory(*vkDevice, vkImage2D, memoryTypeList[0],

View File

@@ -29,6 +29,7 @@
#include <vector> #include <vector>
#include <iostream> #include <iostream>
#include <string.h> #include <string.h>
#include <inttypes.h>
#include "harness/testHarness.h" #include "harness/testHarness.h"
#include "harness/typeWrappers.h" #include "harness/typeWrappers.h"
#include "harness/deviceInfo.h" #include "harness/deviceInfo.h"
@@ -94,7 +95,7 @@ struct ConsistencyExternalImage1DTest : public VulkanTestBase
log_info("Memory type index: %u\n", (uint32_t)memoryTypeList[0]); log_info("Memory type index: %u\n", (uint32_t)memoryTypeList[0]);
log_info("Memory type property: %d\n", log_info("Memory type property: %d\n",
memoryTypeList[0].getMemoryTypeProperty()); memoryTypeList[0].getMemoryTypeProperty());
log_info("Image size : %lu\n", vkImage1D.getSize()); log_info("Image size : %" PRIu64 "\n", vkImage1D.getSize());
VulkanDeviceMemory* vkDeviceMem = VulkanDeviceMemory* vkDeviceMem =
new VulkanDeviceMemory(*vkDevice, vkImage1D, memoryTypeList[0], new VulkanDeviceMemory(*vkDevice, vkImage1D, memoryTypeList[0],

View File

@@ -29,6 +29,7 @@
#include <vector> #include <vector>
#include <iostream> #include <iostream>
#include <string.h> #include <string.h>
#include <inttypes.h>
#include "harness/testHarness.h" #include "harness/testHarness.h"
#include "harness/typeWrappers.h" #include "harness/typeWrappers.h"
#include "harness/deviceInfo.h" #include "harness/deviceInfo.h"
@@ -96,7 +97,7 @@ struct ConsistencyExternalImage3DTest : public VulkanTestBase
log_info("Memory type index: %u\n", (uint32_t)memoryTypeList[0]); log_info("Memory type index: %u\n", (uint32_t)memoryTypeList[0]);
log_info("Memory type property: %d\n", log_info("Memory type property: %d\n",
memoryTypeList[0].getMemoryTypeProperty()); memoryTypeList[0].getMemoryTypeProperty());
log_info("Image size : %lu\n", vkImage3D.getSize()); log_info("Image size : %" PRIu64 "\n", vkImage3D.getSize());
VulkanDeviceMemory* vkDeviceMem = VulkanDeviceMemory* vkDeviceMem =
new VulkanDeviceMemory(*vkDevice, vkImage3D, memoryTypeList[0], new VulkanDeviceMemory(*vkDevice, vkImage3D, memoryTypeList[0],

View File

@@ -1226,7 +1226,7 @@ int run_test_with_multi_import_diff_ctx(
vkCommandBuffer.dispatch(512, 1, 1); vkCommandBuffer.dispatch(512, 1, 1);
vkCommandBuffer.end(); vkCommandBuffer.end();
for (uint32_t i = 0; i < numImports; i++) for (int i = 0; i < numImports; i++)
{ {
update_buffer_kernel1[i] = (numBuffers == 1) update_buffer_kernel1[i] = (numBuffers == 1)
? kernel1[0] ? kernel1[0]