Skip to content

Commit facd05a

Browse files
authored
[NFC] Fix unused variable warning (#7877)
DataSize is only used in a DXASSERT, which is compile out in some configurations resulting in a unused variable warning. This change adds a [[maybe_unused]] attribute to suppress that warning.
1 parent 61de741 commit facd05a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/clang/unittests/HLSLExec/LongVectors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ void fillShaderBufferFromLongVectorData(std::vector<BYTE> &ShaderBuffer,
351351
// underlying type in some cases. Thats fine. Resize just makes sure we have
352352
// enough space.
353353
const size_t NumElements = TestData.size();
354-
const size_t DataSize = sizeof(T) * NumElements;
354+
[[maybe_unused]] const size_t DataSize = sizeof(T) * NumElements;
355355

356356
// Ensure the shader buffer is large enough. It should be pre-sized based on
357357
// the D3D12_RESOURCE_DESC for the associated D3D12_RESOURCE.

0 commit comments

Comments
 (0)