Skip to content

Commit 6f151d3

Browse files
committed
Minor fixes
1 parent e129442 commit 6f151d3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

sycl/source/detail/os_util.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <sycl/detail/os_util.hpp>
1010

1111
#include <cassert>
12+
#include <iostream>
1213
#include <limits>
1314
#if __GNUC__ && __GNUC__ < 8
1415
// Don't include <filesystem> for GCC versions less than 8
@@ -284,12 +285,12 @@ size_t OSUtil::getDirectorySize(const std::string &Path) {
284285
DirSizeVar = 0;
285286
// Use ftw for Linux and darwin as they support posix.
286287
#if defined(__SYCL_RT_OS_LINUX) || defined(__SYCL_RT_OS_DARWIN)
287-
auto SumSize =
288-
[](const char *Fpath, const struct stat *StatBuf, int TypeFlag) {
289-
if (TypeFlag == FTW_F)
290-
DirSizeVar += StatBuf->st_size;
291-
return 0;
292-
};
288+
auto SumSize = []([[maybe_unused]] const char *Fpath,
289+
const struct stat *StatBuf, [[maybe_unused]] int TypeFlag) {
290+
if (TypeFlag == FTW_F)
291+
DirSizeVar += StatBuf->st_size;
292+
return 0;
293+
};
293294

294295
if (ftw(Path.c_str(),SumSize, 1) == -1)
295296
std::cerr << "Failed to get directory size: " << Path << std::endl;

sycl/unittests/kernel-and-program/PersistentDeviceCodeCache.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,6 @@ TEST_P(PersistentDeviceCodeCache, BasicEviction) {
589589

590590
// Get Cache size and size of each entry. Set eviction threshold so that
591591
// just one item is evicted.
592-
size_t CurrentCacheSize = 0;
593592
size_t SizeOfOneEntry =
594593
(size_t)(detail::OSUtil::getDirectorySize(CacheRoot)) + 10;
595594

0 commit comments

Comments
 (0)