[libcxx] r290477 - Fix warning caused by platforms providing a signed wint_t

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 23 17:43:55 PST 2016


Author: ericwf
Date: Fri Dec 23 19:43:54 2016
New Revision: 290477

URL: http://llvm.org/viewvc/llvm-project?rev=290477&view=rev
Log:
Fix warning caused by platforms providing a signed wint_t

Modified:
    libcxx/trunk/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp

Modified: libcxx/trunk/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp?rev=290477&r1=290476&r2=290477&view=diff
==============================================================================
--- libcxx/trunk/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp (original)
+++ libcxx/trunk/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp Fri Dec 23 19:43:54 2016
@@ -112,6 +112,7 @@ int main()
         assert(f.egptr() - f.gptr() == 1);
     }
     {
+        typedef std::char_traits<wchar_t> Traits;
         test_buf<wchar_t> f;
         f.pubimbue(std::locale(LOCALE_en_US_UTF_8));
         assert(f.open("underflow_utf8.dat", std::ios_base::in) != 0);
@@ -119,6 +120,6 @@ int main()
         assert(f.sbumpc() == 0x4E51);
         assert(f.sbumpc() == 0x4E52);
         assert(f.sbumpc() == 0x4E53);
-        assert(f.sbumpc() == static_cast<unsigned>(-1));
+        assert(f.sbumpc() == static_cast<Traits::int_type>(-1));
     }
 }




More information about the cfe-commits mailing list