From e17a155c618765c423cbb66ab010ee616aeb72b3 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Tue, 6 Dec 2016 01:13:29 +0000 Subject: [libcxx] [test] D27023: Fix MSVC warning C4389 "signed/unsigned mismatch", part 10/12. Add static_cast. In these cases, the values are guaranteed to be small-ish, and they're being compared to int elements. test/std/containers/sequences/deque/deque.capacity/access.pass.cpp Use int instead of unsigned to iterate from 0 to 10. llvm-svn: 288747 --- libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp') diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp index bf80c2c6edd..d6fdd18968d 100644 --- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp +++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/test.pass.cpp @@ -35,5 +35,5 @@ int main() for_each_test(0)); assert(f.count == s); for (unsigned i = 0; i < s; ++i) - assert(ia[i] == i+1); + assert(ia[i] == static_cast(i+1)); } -- cgit v1.2.3