diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-12-01 20:21:04 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-12-01 20:21:04 +0000 |
commit | ec3773c2dadbeadfc5def927116c2ee9d9c53066 (patch) | |
tree | 556cfdc9a9d1d6cb484a88a2771ed9c92c13037a /src/strstream.cpp | |
parent | 9996844df0f22a68a1af6d30c611be1f1ebf1486 (diff) | |
download | external_libcxx-ec3773c2dadbeadfc5def927116c2ee9d9c53066.tar.gz external_libcxx-ec3773c2dadbeadfc5def927116c2ee9d9c53066.tar.bz2 external_libcxx-ec3773c2dadbeadfc5def927116c2ee9d9c53066.zip |
Quash a whole bunch of warnings
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/strstream.cpp')
-rw-r--r-- | src/strstream.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/strstream.cpp b/src/strstream.cpp index 53139509e..8cd19e6a3 100644 --- a/src/strstream.cpp +++ b/src/strstream.cpp @@ -34,7 +34,7 @@ void strstreambuf::__init(char* __gnext, streamsize __n, char* __pbeg) { if (__n == 0) - __n = strlen(__gnext); + __n = static_cast<streamsize>(strlen(__gnext)); else if (__n < 0) __n = INT_MAX; if (__pbeg == nullptr) @@ -160,12 +160,12 @@ strstreambuf::overflow(int_type __c) streamsize new_size = max<streamsize>(__alsize_, 2*old_size); char* buf = nullptr; if (__palloc_) - buf = static_cast<char*>(__palloc_(new_size)); + buf = static_cast<char*>(__palloc_(static_cast<size_t>(new_size))); else buf = new char[new_size]; if (buf == nullptr) return int_type(EOF); - memcpy(buf, eback(), old_size); + memcpy(buf, eback(), static_cast<size_t>(old_size)); ptrdiff_t ninp = gptr() - eback(); ptrdiff_t einp = egptr() - eback(); ptrdiff_t nout = pptr() - pbase(); @@ -179,7 +179,7 @@ strstreambuf::overflow(int_type __c) } setg(buf, buf + ninp, buf + einp); setp(buf + einp, buf + einp + eout); - pbump(nout); + pbump(static_cast<int>(nout)); __strmode_ |= __allocated; } *pptr() = static_cast<char>(__c); |