mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-26 08:49:02 +00:00
basic: fix unused-but-set variables (#1764)
Remove the unused `numItems` variable. As this fixes all occurrences of this warning in test_basic, remove the suppression flag. Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
committed by
GitHub
parent
16a75dc0af
commit
44b2578ac7
@@ -70,6 +70,4 @@ if(APPLE)
|
|||||||
list(APPEND ${MODULE_NAME}_SOURCES test_queue_priority.cpp)
|
list(APPEND ${MODULE_NAME}_SOURCES test_queue_priority.cpp)
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
set_gnulike_module_compile_flags("-Wno-unused-but-set-variable")
|
|
||||||
|
|
||||||
include(../CMakeCommon.txt)
|
include(../CMakeCommon.txt)
|
||||||
|
|||||||
@@ -91,7 +91,6 @@ int test_work_item_functions(cl_device_id deviceID, cl_context context, cl_comma
|
|||||||
{
|
{
|
||||||
for( int i = 0; i < NUM_TESTS; i++ )
|
for( int i = 0; i < NUM_TESTS; i++ )
|
||||||
{
|
{
|
||||||
size_t numItems = 1;
|
|
||||||
for( size_t j = 0; j < dim; j++ )
|
for( size_t j = 0; j < dim; j++ )
|
||||||
{
|
{
|
||||||
// All of our thread sizes should be within the max local sizes, since they're all <= 20
|
// All of our thread sizes should be within the max local sizes, since they're all <= 20
|
||||||
@@ -100,8 +99,6 @@ int test_work_item_functions(cl_device_id deviceID, cl_context context, cl_comma
|
|||||||
while( localThreads[ j ] > 1 && ( threads[ j ] % localThreads[ j ] != 0 ) )
|
while( localThreads[ j ] > 1 && ( threads[ j ] % localThreads[ j ] != 0 ) )
|
||||||
localThreads[ j ]--;
|
localThreads[ j ]--;
|
||||||
|
|
||||||
numItems *= threads[ j ];
|
|
||||||
|
|
||||||
// Hack for now: localThreads > 1 are iffy
|
// Hack for now: localThreads > 1 are iffy
|
||||||
localThreads[ j ] = 1;
|
localThreads[ j ] = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user