diff options
4 files changed, 10 insertions, 7 deletions
diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cp_size_cp.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cp_size_cp.pass.cpp index 5d345f13dd4..1bac82d303c 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cp_size_cp.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/cp_size_cp.pass.cpp @@ -15,6 +15,7 @@ #include <strstream> #include <cassert> +#include <cstring> int main() { @@ -71,8 +72,8 @@ int main() } { char buf[10] = "abcd"; - int s = std::strlen(buf); - std::strstreambuf sb(buf, sizeof(buf)-s, buf + s); + std::size_t s = std::strlen(buf); + std::strstreambuf sb(buf, sizeof(buf) - s, buf + s); assert(sb.sgetc() == 'a'); assert(sb.snextc() == 'b'); assert(sb.snextc() == 'c'); diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/scp_size_scp.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/scp_size_scp.pass.cpp index c827850abf3..289b61f4399 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/scp_size_scp.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/scp_size_scp.pass.cpp @@ -15,6 +15,7 @@ #include <strstream> #include <cassert> +#include <cstring> int main() { @@ -71,8 +72,8 @@ int main() } { signed char buf[10] = "abcd"; - int s = std::strlen((char*)buf); - std::strstreambuf sb(buf, sizeof(buf)-s, buf + s); + std::size_t s = std::strlen((char*)buf); + std::strstreambuf sb(buf, sizeof(buf) - s, buf + s); assert(sb.sgetc() == 'a'); assert(sb.snextc() == 'b'); assert(sb.snextc() == 'c'); diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ucp_size_ucp.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ucp_size_ucp.pass.cpp index 46c11e4afaf..b0920f7a76f 100644 --- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ucp_size_ucp.pass.cpp +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/ucp_size_ucp.pass.cpp @@ -15,6 +15,7 @@ #include <strstream> #include <cassert> +#include <cstring> int main() { @@ -71,8 +72,8 @@ int main() } { unsigned char buf[10] = "abcd"; - int s = std::strlen((char*)buf); - std::strstreambuf sb(buf, sizeof(buf)-s, buf + s); + std::size_t s = std::strlen((char*)buf); + std::strstreambuf sb(buf, sizeof(buf) - s, buf + s); assert(sb.sgetc() == 'a'); assert(sb.snextc() == 'b'); assert(sb.snextc() == 'c'); diff --git a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp index 6b6737a765d..ccd043cc960 100644 --- a/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp +++ b/libcxx/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp @@ -45,7 +45,7 @@ protected: { if (ch != base::traits_type::eof()) { - int n = str_.size(); + std::size_t n = str_.size(); str_.push_back(static_cast<CharT>(ch)); str_.resize(str_.capacity()); base::setp(const_cast<CharT*>(str_.data()), |