This is an archive of the discontinued LLVM Phabricator instance.

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

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

Details

Summary

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

Change "unsigned n = 0;" to "int n = 0;". It's being compared to int elements and ptrdiff_t distances.

test/std/containers/sequences/forwardlist/forwardlist.cons/move.pass.cpp
This one's a little special, but not really. "*i == n" is comparing MoveOnly to n.
MoveOnly is implicitly constructible from int, so int is the correct type to use here.

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 78994.Nov 22 2016, 4:55 PM
STL_MSFT retitled this revision from to [libcxx] [test] Fix MSVC warning C4389 "signed/unsigned mismatch", part 11/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:39 PM
EricWF edited edge metadata.
This revision is now accepted and ready to land.Dec 2 2016, 11:39 PM
STL_MSFT closed this revision.Dec 5 2016, 5:27 PM

Thanks, r288748.