Skip to content

Commit

Permalink
basic: fix unused-but-set variables (#1764)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
svenvh committed Jun 16, 2023
1 parent 16a75dc commit 44b2578
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions test_conformance/basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 0 additions & 3 deletions test_conformance/basic/test_work_item_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down

0 comments on commit 44b2578

Please sign in to comment.