diff options
author | Jan Korous <jkorous@apple.com> | 2019-07-12 22:25:17 +0000 |
---|---|---|
committer | Jan Korous <jkorous@apple.com> | 2019-07-12 22:25:17 +0000 |
commit | 000ba715ddbd2a7af17534105f8a0916d4168c3e (patch) | |
tree | 65dc342f6aad3ab903c1bae9a06a4df321f90df4 /clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp | |
parent | b131ad0be2849fe367eac4ad7cc6eca198a08a28 (diff) | |
download | bcm5719-llvm-000ba715ddbd2a7af17534105f8a0916d4168c3e.tar.gz bcm5719-llvm-000ba715ddbd2a7af17534105f8a0916d4168c3e.zip |
[DirectoryWatcher][NFC] Silence warnings in release build
llvm-svn: 365968
Diffstat (limited to 'clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp')
-rw-r--r-- | clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp b/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp index a2c50fc7d00..0808ff47dee 100644 --- a/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp +++ b/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp @@ -38,12 +38,18 @@ struct DirectoryWatcherTestFixture { DirectoryWatcherTestFixture() { SmallString<128> pathBuf; - std::error_code UniqDirRes = createUniqueDirectory("dirwatcher", pathBuf); +#ifndef NDEBUG + std::error_code UniqDirRes = +#endif + createUniqueDirectory("dirwatcher", pathBuf); assert(!UniqDirRes); TestRootDir = pathBuf.str(); path::append(pathBuf, "watch"); TestWatchedDir = pathBuf.str(); - std::error_code CreateDirRes = create_directory(TestWatchedDir, false); +#ifndef NDEBUG + std::error_code CreateDirRes = +#endif + create_directory(TestWatchedDir, false); assert(!CreateDirRes); } @@ -415,8 +421,9 @@ TEST(DirectoryWatcherTest, ChangeMetadata) { const int FD = HopefullyTheFD.get(); const TimePoint<> NewTimePt = std::chrono::system_clock::now() - std::chrono::minutes(1); - +#ifndef NDEBUG std::error_code setTimeRes = +#endif llvm::sys::fs::setLastAccessAndModificationTime(FD, NewTimePt, NewTimePt); assert(!setTimeRes); |