[libcxx] r185756 - Silence -Wint-to-void-pointer-cast warning in test.

Howard Hinnant hhinnant at apple.com
Sat Jul 6 07:41:36 PDT 2013


Author: hhinnant
Date: Sat Jul  6 09:41:36 2013
New Revision: 185756

URL: http://llvm.org/viewvc/llvm-project?rev=185756&view=rev
Log:
Silence -Wint-to-void-pointer-cast warning in test.

Modified:
    libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp

Modified: libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp?rev=185756&r1=185755&r2=185756&view=diff
==============================================================================
--- libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp (original)
+++ libcxx/trunk/test/input.output/iostreams.base/ios.base/ios.base.storage/pword.pass.cpp Sat Jul  6 09:41:36 2013
@@ -16,6 +16,7 @@
 #include <ios>
 #include <string>
 #include <cassert>
+#include <cstdint>
 
 class test
     : public std::ios
@@ -31,12 +32,12 @@ int main()
 {
     test t;
     std::ios_base& b = t;
-    for (int i = 0; i < 10000; ++i)
+    for (std::intptr_t i = 0; i < 10000; ++i)
     {
         assert(b.pword(i) == 0);
         b.pword(i) = (void*)i;
         assert(b.pword(i) == (void*)i);
-        for (int j = 0; j <= i; ++j)
+        for (std::intptr_t j = 0; j <= i; ++j)
             assert(b.pword(j) == (void*)j);
     }
 }





More information about the cfe-commits mailing list