From 15dc68b6b8e726c5fc6addfe7247b90fe7c9ce31 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 13 Sep 2005 14:34:38 +0000 Subject: [PATCH] fixed Sun CC warning about local variable read hiding wxStreamBuffer::read git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/stream.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/common/stream.cpp b/src/common/stream.cpp index babad3a110..347b46ee8b 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -376,14 +376,14 @@ size_t wxStreamBuffer::Read(void *buffer, size_t size) if ( m_stream ) m_stream->Reset(); - size_t read; + size_t readBytes; if ( !HasBuffer() ) { wxInputStream *inStream = GetInputStream(); wxCHECK_MSG( inStream, 0, _T("should have a stream in wxStreamBuffer") ); - read = inStream->OnSysRead(buffer, size); + readBytes = inStream->OnSysRead(buffer, size); } else // we have a buffer, use it { @@ -414,13 +414,13 @@ size_t wxStreamBuffer::Read(void *buffer, size_t size) } } - read = orig_size - size; + readBytes = orig_size - size; } if ( m_stream ) - m_stream->m_lastcount = read; + m_stream->m_lastcount = readBytes; - return read; + return readBytes; } // this should really be called "Copy()" @@ -1279,5 +1279,4 @@ wxOutputStream& wxEndL(wxOutputStream& stream) return stream.Write(eol, wxStrlen(eol)); } -#endif - // wxUSE_STREAMS +#endif // wxUSE_STREAMS -- 2.45.2