This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Fix an MSVC x64 compiler warning.
ClosedPublic

Authored by STL_MSFT on Jul 29 2016, 12:54 PM.

Details

Summary

Fix an MSVC x64 compiler warning, "warning C4312: 'type cast': conversion from 'unsigned int' to 'int *' of greater size".

The warning (which is valuable) is simple to avoid: widen to uintptr_t, then cast. I'm additionally using C++ casts for clarity.

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 66162.Jul 29 2016, 12:54 PM
STL_MSFT retitled this revision from to [libcxx] [test] Fix an MSVC x64 compiler warning..
STL_MSFT updated this object.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
EricWF accepted this revision.Aug 2 2016, 10:55 PM
EricWF edited edge metadata.
This revision is now accepted and ready to land.Aug 2 2016, 10:55 PM
EricWF closed this revision.Aug 2 2016, 10:55 PM

r277573.