mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
basic: fix more unused-but-set variables (#1811)
This commit is contained in:
committed by
GitHub
parent
aa953aaa51
commit
7759c2669a
@@ -581,13 +581,19 @@ static void l_load_abilities(cl_device_id device)
|
|||||||
cl_uint max_dim = 0;
|
cl_uint max_dim = 0;
|
||||||
status = clGetDeviceInfo(device, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS,
|
status = clGetDeviceInfo(device, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS,
|
||||||
sizeof(max_dim), &max_dim, 0);
|
sizeof(max_dim), &max_dim, 0);
|
||||||
assert(status == CL_SUCCESS);
|
if (check_error(status,
|
||||||
|
"clGetDeviceInfo for "
|
||||||
|
"CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS failed."))
|
||||||
|
return;
|
||||||
assert(max_dim > 0);
|
assert(max_dim > 0);
|
||||||
size_t max_id[3];
|
size_t max_id[3];
|
||||||
max_id[0] = 0;
|
max_id[0] = 0;
|
||||||
status = clGetDeviceInfo(device, CL_DEVICE_MAX_WORK_ITEM_SIZES,
|
status = clGetDeviceInfo(device, CL_DEVICE_MAX_WORK_ITEM_SIZES,
|
||||||
max_dim * sizeof(size_t), &max_id[0], 0);
|
max_dim * sizeof(size_t), &max_id[0], 0);
|
||||||
assert(status == CL_SUCCESS);
|
if (check_error(status,
|
||||||
|
"clGetDeviceInfo for "
|
||||||
|
"CL_DEVICE_MAX_WORK_ITEM_SIZES failed."))
|
||||||
|
return;
|
||||||
l_max_global_id0 = max_id[0];
|
l_max_global_id0 = max_id[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -597,7 +603,10 @@ static void l_load_abilities(cl_device_id device)
|
|||||||
status =
|
status =
|
||||||
clGetDeviceInfo(device, CL_DEVICE_LINKER_AVAILABLE,
|
clGetDeviceInfo(device, CL_DEVICE_LINKER_AVAILABLE,
|
||||||
sizeof(l_linker_available), &l_linker_available, 0);
|
sizeof(l_linker_available), &l_linker_available, 0);
|
||||||
assert(status == CL_SUCCESS);
|
if (check_error(status,
|
||||||
|
"clGetDeviceInfo for "
|
||||||
|
"CL_DEVICE_LINKER_AVAILABLE failed."))
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -903,6 +912,7 @@ static std::string global_decls(const TypeInfo& ti, bool with_init)
|
|||||||
vol, tn, vol, tn, vol, tn, vol, tn);
|
vol, tn, vol, tn, vol, tn, vol, tn);
|
||||||
}
|
}
|
||||||
assert(num_printed < sizeof(decls));
|
assert(num_printed < sizeof(decls));
|
||||||
|
(void)num_printed;
|
||||||
return std::string(decls);
|
return std::string(decls);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -983,6 +993,7 @@ static std::string writer_function(const TypeInfo& ti)
|
|||||||
writer_template_atomic, ti.get_buf_elem_type());
|
writer_template_atomic, ti.get_buf_elem_type());
|
||||||
}
|
}
|
||||||
assert(num_printed < sizeof(writer_src));
|
assert(num_printed < sizeof(writer_src));
|
||||||
|
(void)num_printed;
|
||||||
std::string result = writer_src;
|
std::string result = writer_src;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -1024,6 +1035,7 @@ static std::string reader_function(const TypeInfo& ti)
|
|||||||
ti.get_buf_elem_type(), ti.get_buf_elem_type());
|
ti.get_buf_elem_type(), ti.get_buf_elem_type());
|
||||||
}
|
}
|
||||||
assert(num_printed < sizeof(reader_src));
|
assert(num_printed < sizeof(reader_src));
|
||||||
|
(void)num_printed;
|
||||||
std::string result = reader_src;
|
std::string result = reader_src;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user