Skip to content

Commit d707a41

Browse files
Correct variable declaration in tests
This issue is visible with clang-11 on single sku builds of xe_hp_sdv and later platforms. Signed-off-by: Filip Hazubski <[email protected]>
1 parent 8288fa7 commit d707a41

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

opencl/test/unit_test/api/cl_mem_locally_uncached_resource_tests.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ uint32_t cmdQueueMocs(CommandQueue *pCmdQ) {
5151
}
5252

5353
const size_t n = 512;
54-
const size_t globalWorkSize[3] = {n, 1, 1};
55-
const size_t localWorkSize[3] = {256, 1, 1};
54+
[[maybe_unused]] const size_t globalWorkSize[3] = {n, 1, 1};
55+
[[maybe_unused]] const size_t localWorkSize[3] = {256, 1, 1};
5656

57-
const cl_mem_properties_intel *propertiesCacheable = nullptr;
58-
const cl_mem_properties_intel propertiesUncacheable[] = {CL_MEM_FLAGS_INTEL, CL_MEM_LOCALLY_UNCACHED_RESOURCE, 0};
59-
const cl_mem_properties_intel propertiesUncacheableInSurfaceState[] = {CL_MEM_FLAGS_INTEL, CL_MEM_LOCALLY_UNCACHED_SURFACE_STATE_RESOURCE, 0};
57+
[[maybe_unused]] const cl_mem_properties_intel *propertiesCacheable = nullptr;
58+
[[maybe_unused]] const cl_mem_properties_intel propertiesUncacheable[] = {CL_MEM_FLAGS_INTEL, CL_MEM_LOCALLY_UNCACHED_RESOURCE, 0};
59+
[[maybe_unused]] const cl_mem_properties_intel propertiesUncacheableInSurfaceState[] = {CL_MEM_FLAGS_INTEL, CL_MEM_LOCALLY_UNCACHED_SURFACE_STATE_RESOURCE, 0};
6060

6161
using clMemLocallyUncachedResourceFixture = Test<HelloWorldFixture<HelloWorldFixtureFactory>>;
6262

0 commit comments

Comments
 (0)