From f4731b64d269a2c16727a3db9da868707e0cbb14 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 2 May 2003 00:53:13 +0200 Subject: [PATCH] streambuf.tcc (__copy_streambufs): Adjust the type of __avail to ptrdiff_t to avoid signed-unsigned warning. 2003-05-01 Paolo Carlini * include/bits/streambuf.tcc (__copy_streambufs): Adjust the type of __avail to ptrdiff_t to avoid signed-unsigned warning. From-SVN: r66356 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/bits/streambuf.tcc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 331d5e59e01..fe539924d25 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2003-05-01 Paolo Carlini + + * include/bits/streambuf.tcc (__copy_streambufs): Adjust the + type of __avail to ptrdiff_t to avoid signed-unsigned warning. + 2003-05-01 Benjamin Kosnik * testsuite/abi_check.cc (check_version): Update known versions. diff --git a/libstdc++-v3/include/bits/streambuf.tcc b/libstdc++-v3/include/bits/streambuf.tcc index e4aab0ccc31..08b24c81d36 100644 --- a/libstdc++-v3/include/bits/streambuf.tcc +++ b/libstdc++-v3/include/bits/streambuf.tcc @@ -192,8 +192,8 @@ namespace std for (;;) { streamsize __xtrct; - const size_t __avail = __sbin->_M_in_end - - __sbin->_M_in_cur; + const ptrdiff_t __avail = __sbin->_M_in_end + - __sbin->_M_in_cur; if (__avail) { __xtrct = __sbout->sputn(__sbin->_M_in_cur, __avail);