Skip to content

Commit 74c2c8f

Browse files
committed
Asserting that the call to chdir succeeds in this test. Fixes some -Wunused-result warnings.
llvm-svn: 215539
1 parent 0fb9981 commit 74c2c8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/unittests/Support/LockFileManagerTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ TEST(LockFileManagerTest, RelativePath) {
9595

9696
char PathBuf[1024];
9797
const char *OrigPath = getcwd(PathBuf, 1024);
98-
chdir(TmpDir.c_str());
98+
ASSERT_FALSE(chdir(TmpDir.c_str()));
9999

100100
sys::fs::create_directory("inner");
101101
SmallString<64> LockedFile("inner");
@@ -118,7 +118,7 @@ TEST(LockFileManagerTest, RelativePath) {
118118
EC = sys::fs::remove("inner");
119119
ASSERT_FALSE(EC);
120120

121-
chdir(OrigPath);
121+
ASSERT_FALSE(chdir(OrigPath));
122122

123123
EC = sys::fs::remove(StringRef(TmpDir));
124124
ASSERT_FALSE(EC);

0 commit comments

Comments
 (0)