This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Fix MSVC warning C4389 "signed/unsigned mismatch", part 9/12.
ClosedPublic

Authored by STL_MSFT on Nov 22 2016, 4:53 PM.

Details

Summary

[libcxx] [test] Fix MSVC warning C4389 "signed/unsigned mismatch", part 9/12.

Add static_cast<std::size_t> to more comparisons. (Performed manually, unlike part 8/12.)

Also, include <cstddef> when it wasn't already being included.

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 78992.Nov 22 2016, 4:53 PM
STL_MSFT retitled this revision from to [libcxx] [test] Fix MSVC warning C4389 "signed/unsigned mismatch", part 9/12..
STL_MSFT updated this object.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
EricWF accepted this revision.Dec 2 2016, 11:36 PM
EricWF edited edge metadata.

LGTM.

I may have considered doing the cast to ptrdiff_t for the other operand instead of the size_t cast, but IDK which is better.

This revision is now accepted and ready to land.Dec 2 2016, 11:36 PM
STL_MSFT closed this revision.Dec 5 2016, 5:27 PM

Thanks, r288746.