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:
Sven van Haastregt
2023-06-16 10:53:08 +01:00
committed by GitHub
parent 16a75dc0af
commit 44b2578ac7
2 changed files with 0 additions and 5 deletions

View File

@@ -70,6 +70,4 @@ if(APPLE)
list(APPEND ${MODULE_NAME}_SOURCES test_queue_priority.cpp)
endif(APPLE)
set_gnulike_module_compile_flags("-Wno-unused-but-set-variable")
include(../CMakeCommon.txt)

View File

@@ -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++ )
{
size_t numItems = 1;
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
@@ -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 ) )
localThreads[ j ]--;
numItems *= threads[ j ];
// Hack for now: localThreads > 1 are iffy
localThreads[ j ] = 1;
}