Skip to content

Commit

Permalink
Address compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanC committed Oct 3, 2024
1 parent 3e20b57 commit 33a4764
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions tests/test_openclhpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4200,22 +4200,22 @@ void testCommandBufferKhrUpdateMutableCommands() {
clUpdateMutableCommandsKHR_testCommandBufferKhrUpdateMutableCommands);
response = commandBufferKhrPool[0].updateMutableCommands(&config);
#else
cl_uint num_configs = 1;
std::array<cl_command_buffer_update_type_khr, 1> config_types = {{
constexpr cl_uint num_configs = 1;
std::array<cl_command_buffer_update_type_khr, num_configs> config_types = {{
CL_STRUCTURE_TYPE_MUTABLE_DISPATCH_CONFIG_KHR
}};
std::array<const void*, 1> configs = {&dispatch_list};
std::array<const void*, num_configs> configs = {&dispatch_list};
clUpdateMutableCommandsKHR_StubWithCallback(
clUpdateMutableCommandsKHR_testCommandBufferKhrUpdateMutableCommands);
response = commandBufferKhrPool[0].updateMutableCommands<1>(config_types, configs);
response = commandBufferKhrPool[0].updateMutableCommands<num_configs>(config_types, configs);
#endif
TEST_ASSERT_EQUAL(CL_SUCCESS, response);
}

static cl_int clGetMutableCommandInfoKHR_testMutableCommandKhrGetInfoCommandQueue(
cl_mutable_command_khr command, cl_mutable_command_info_khr param_name,
size_t param_value_size, void* param_value, size_t* param_value_size_ret,
int num_calls)
size_t param_value_size, void* param_value, size_t* /*param_value_size_ret*/,
int /*num_calls*/)
{
TEST_ASSERT_EQUAL(command, mutableCommandKhrPool[0]());
TEST_ASSERT_EQUAL(param_name, CL_MUTABLE_COMMAND_COMMAND_QUEUE_KHR);
Expand Down Expand Up @@ -4244,8 +4244,8 @@ void testMutableCommandKhrGetInfoCommandQueue()

static cl_int clGetMutableCommandInfoKHR_testMutableCommandKhrGetInfoCommandBuffer(
cl_mutable_command_khr command, cl_mutable_command_info_khr param_name,
size_t param_value_size, void* param_value, size_t* param_value_size_ret,
int num_calls)
size_t param_value_size, void* param_value, size_t* /*param_value_size_ret*/,
int /*num_calls*/)
{
TEST_ASSERT_EQUAL(command, mutableCommandKhrPool[0]());
TEST_ASSERT_EQUAL(param_name, CL_MUTABLE_COMMAND_COMMAND_BUFFER_KHR);
Expand Down Expand Up @@ -4330,16 +4330,16 @@ void testMutableCommandKhrGetInfoPropertiesArray()

TEST_ASSERT_EQUAL(CL_SUCCESS, err);
TEST_ASSERT_EQUAL(3, kernel_properties.size());
for (int i = 0; i < kernel_properties.size(); i++)
for (size_t i = 0; i < kernel_properties.size(); i++)
{
TEST_ASSERT_EQUAL(i + 1, kernel_properties[i]);
}
}

static cl_int clGetMutableCommandInfoKHR_testMutableCommandKhrGetInfoCommandType(
cl_mutable_command_khr command, cl_mutable_command_info_khr param_name,
size_t param_value_size, void* param_value, size_t* param_value_size_ret,
int num_calls)
size_t param_value_size, void* param_value, size_t* /*param_value_size_ret*/,
int /*num_calls*/)
{
TEST_ASSERT_EQUAL(command, mutableCommandKhrPool[0]());
TEST_ASSERT_EQUAL(param_name, CL_MUTABLE_COMMAND_COMMAND_TYPE_KHR);
Expand All @@ -4365,8 +4365,8 @@ void testMutableCommandKhrGetInfoCommandType()

static cl_int clGetMutableCommandInfoKHR_testMutableCommandKhrGetInfoDispatchKernel(
cl_mutable_command_khr command, cl_mutable_command_info_khr param_name,
size_t param_value_size, void* param_value, size_t* param_value_size_ret,
int num_calls)
size_t param_value_size, void* param_value, size_t* /*param_value_size_ret*/,
int /*num_calls*/)
{
TEST_ASSERT_EQUAL(command, mutableCommandKhrPool[0]());
TEST_ASSERT_EQUAL(param_name, CL_MUTABLE_DISPATCH_KERNEL_KHR);
Expand All @@ -4392,8 +4392,8 @@ void testMutableCommandKhrGetInfoDispatchKernel()

static cl_int clGetMutableCommandInfoKHR_testMutableCommandKhrGetInfoDispatchDimensions(
cl_mutable_command_khr command, cl_mutable_command_info_khr param_name,
size_t param_value_size, void* param_value, size_t* param_value_size_ret,
int num_calls)
size_t param_value_size, void* param_value, size_t* /*param_value_size_ret*/,
int /*num_calls*/)
{
TEST_ASSERT_EQUAL(command, mutableCommandKhrPool[0]());
TEST_ASSERT_EQUAL(param_name, CL_MUTABLE_DISPATCH_DIMENSIONS_KHR);
Expand Down Expand Up @@ -4461,7 +4461,7 @@ void testMutableCommandKhrGetInfoGlobalWorkOffset()
cl::vector<cl::size_type> global_work_offset = mutableCommandKhrPool[0].getInfo<CL_MUTABLE_DISPATCH_GLOBAL_WORK_OFFSET_KHR>(&err);
TEST_ASSERT_EQUAL(CL_SUCCESS, err);
TEST_ASSERT_EQUAL(3, global_work_offset.size());
for (int i = 0; i < global_work_offset.size(); i++)
for (cl::size_type i = 0; i < global_work_offset.size(); i++)
{
TEST_ASSERT_EQUAL(i + 2, global_work_offset[i]);
}
Expand Down Expand Up @@ -4491,7 +4491,7 @@ static cl_int clGetMutableCommandInfoKHR_testMutableCommandKhrGetInfoGlobalWorkS
if (param_value != nullptr)
{
cl::size_type data[] = { 3, 4, 5 };
for (int i = 0; i < 3; i++)
for (cl::size_type i = 0; i < 3; i++)
{
*(&(static_cast<cl::size_type*>(param_value)[i])) = data[i];
}
Expand All @@ -4511,7 +4511,7 @@ void testMutableCommandKhrGetInfoGlobalWorkSize()
cl::vector<cl::size_type> global_work_size = mutableCommandKhrPool[0].getInfo<CL_MUTABLE_DISPATCH_GLOBAL_WORK_SIZE_KHR>(&err);
TEST_ASSERT_EQUAL(CL_SUCCESS, err);
TEST_ASSERT_EQUAL(3, global_work_size.size());
for (int i = 0; i < global_work_size.size(); i++)
for (cl::size_type i = 0; i < global_work_size.size(); i++)
{
TEST_ASSERT_EQUAL(i + 3, global_work_size[i]);
}
Expand Down Expand Up @@ -4561,7 +4561,7 @@ void testMutableCommandKhrGetInfoLocalWorkSize()
cl::vector<cl::size_type> local_work_size = mutableCommandKhrPool[0].getInfo<CL_MUTABLE_DISPATCH_LOCAL_WORK_SIZE_KHR>(&err);
TEST_ASSERT_EQUAL(CL_SUCCESS, err);
TEST_ASSERT_EQUAL(3, local_work_size.size());
for (int i = 0; i < local_work_size.size(); i++)
for (cl::size_type i = 0; i < local_work_size.size(); i++)
{
TEST_ASSERT_EQUAL(i + 4, local_work_size[i]);
}
Expand Down

0 comments on commit 33a4764

Please sign in to comment.