[libcxx] [test] D27019: Fix MSVC warning C4245 "conversion from 'X' to 'Y', signed/unsigned mismatch", part 6/12.
Add static_cast when initializing unsigned integers with negative numbers (in order to obtain big values). git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287826 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -76,7 +76,7 @@ int main()
|
||||
testbuf<char> sb;
|
||||
std::ostream os(&sb);
|
||||
hex(os);
|
||||
unsigned long long n = -10;
|
||||
unsigned long long n = static_cast<unsigned long long>(-10);
|
||||
os << n;
|
||||
assert(sb.str() == "fffffffffffffff6");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user