[llvm] r215539 - Asserting that the call to chdir succeeds in this test. Fixes some -Wunused-result warnings.
Aaron Ballman
aaron at aaronballman.com
Wed Aug 13 04:17:42 PDT 2014
Author: aaronballman
Date: Wed Aug 13 06:17:41 2014
New Revision: 215539
URL: http://llvm.org/viewvc/llvm-project?rev=215539&view=rev
Log:
Asserting that the call to chdir succeeds in this test. Fixes some -Wunused-result warnings.
Modified:
llvm/trunk/unittests/Support/LockFileManagerTest.cpp
Modified: llvm/trunk/unittests/Support/LockFileManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/LockFileManagerTest.cpp?rev=215539&r1=215538&r2=215539&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/LockFileManagerTest.cpp (original)
+++ llvm/trunk/unittests/Support/LockFileManagerTest.cpp Wed Aug 13 06:17:41 2014
@@ -95,7 +95,7 @@ TEST(LockFileManagerTest, RelativePath)
char PathBuf[1024];
const char *OrigPath = getcwd(PathBuf, 1024);
- chdir(TmpDir.c_str());
+ ASSERT_FALSE(chdir(TmpDir.c_str()));
sys::fs::create_directory("inner");
SmallString<64> LockedFile("inner");
@@ -118,7 +118,7 @@ TEST(LockFileManagerTest, RelativePath)
EC = sys::fs::remove("inner");
ASSERT_FALSE(EC);
- chdir(OrigPath);
+ ASSERT_FALSE(chdir(OrigPath));
EC = sys::fs::remove(StringRef(TmpDir));
ASSERT_FALSE(EC);
More information about the llvm-commits
mailing list