mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
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:
@@ -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],
|
||||||
|
|||||||
@@ -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],
|
||||||
|
|||||||
@@ -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],
|
||||||
|
|||||||
@@ -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]
|
||||||
|
|||||||
Reference in New Issue
Block a user