1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

[SystemZ][z/OS] Fix warning caused by umask returning a signed integer type

On z/OS, umask() returns an int because mode_t is type int, however it is being compared to an unsigned int. This patch fixes the following warning we see when compiling Path.cpp.

```
comparison of integers of different signs: 'const int' and 'const unsigned int'
```

Reviewed By: muiez

Differential Revision: https://reviews.llvm.org/D102326
This commit is contained in:
Abhina Sreeskantharajan 2021-05-12 12:26:00 -04:00
parent 2b9c980a98
commit d19ac5a2e6

View File

@ -1933,7 +1933,8 @@ TEST_F(FileSystemTest, getUmask) {
unsigned CurrentMask = fs::getUmask();
EXPECT_EQ(CurrentMask, 0022U)
<< "getUmask() didn't return previously set umask()";
EXPECT_EQ(::umask(OldMask), 0022U) << "getUmask() may have changed umask()";
EXPECT_EQ(::umask(OldMask), mode_t(0022U))
<< "getUmask() may have changed umask()";
#endif
}