diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp --- a/llvm/unittests/Support/Path.cpp +++ b/llvm/unittests/Support/Path.cpp @@ -1933,7 +1933,8 @@ 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 }