diff --git a/sycl/test-e2e/USM/fill_any_size.cpp b/sycl/test-e2e/USM/fill_any_size.cpp index 9f2cc1de9a39..5dff6245fce9 100644 --- a/sycl/test-e2e/USM/fill_any_size.cpp +++ b/sycl/test-e2e/USM/fill_any_size.cpp @@ -15,7 +15,7 @@ #include #include -constexpr size_t MaxPatternSize{32}; // bytes +constexpr size_t MaxPatternSize{32}; // Bytes. constexpr size_t NumElements{10}; constexpr size_t NumRepeats{1}; constexpr bool verbose{false}; @@ -24,9 +24,9 @@ template int test(sycl::queue &q, uint8_t firstValue = 0) { using T = std::array; T value{}; - for (unsigned int i{0}; i < PatternSize; ++i) { + for (size_t i{0}; i < PatternSize; ++i) { if constexpr (SameValue) { - value[0] = firstValue; + value[i] = firstValue; } else { value[i] = firstValue + i; } @@ -40,8 +40,8 @@ int test(sycl::queue &q, uint8_t firstValue = 0) { std::array host{}; q.copy(dptr, host.data(), NumElements).wait(); bool pass{true}; - for (unsigned int i{0}; i < NumElements; ++i) { - for (unsigned int j{0}; j < PatternSize; ++j) { + for (size_t i{0}; i < NumElements; ++i) { + for (size_t j{0}; j < PatternSize; ++j) { if (host[i][j] != value[j]) { pass = false; }