diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-06-20 03:07:55 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-06-20 03:07:55 +0000 |
commit | 4fb01b7b425e8525e55994e80232e61eeb279dfc (patch) | |
tree | ffa29a750573f0f386deb3458f855d27dfeae79d /vos | |
parent | b628e52083abd2604a8ad4c277dd3759984c8a48 (diff) |
INTEGRATION: CWS warnings01 (1.1.1.1.148); FILE MERGED
2005/11/21 15:07:04 sb 1.1.1.1.148.3: #i53898# Made code warning-free.
2005/09/23 00:19:25 sb 1.1.1.1.148.2: RESYNC: (1.1.1.1-1.2); FILE MERGED
2005/09/01 09:29:47 sb 1.1.1.1.148.1: #i53898# Made code warning-free.
Diffstat (limited to 'vos')
-rw-r--r-- | vos/source/stream.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/vos/source/stream.cxx b/vos/source/stream.cxx index 1c1ff0071ffb..1b823e7974db 100644 --- a/vos/source/stream.cxx +++ b/vos/source/stream.cxx @@ -4,9 +4,9 @@ * * $RCSfile: stream.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: vg $ $Date: 2006-06-02 12:44:56 $ + * last change: $Author: hr $ $Date: 2006-06-20 04:07:55 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -33,6 +33,7 @@ * ************************************************************************/ +#include <limits> #include <osl/diagnose.h> #include <vos/object.hxx> @@ -69,7 +70,9 @@ sal_Int32 OStream::read(IPositionableStream::Offset offset, sal_Int32 OStream::write(const void* pbuffer, sal_uInt32 n) { - return (m_rStream.write(pbuffer, n) == n); + return + n <= static_cast< sal_uInt32 >(std::numeric_limits< sal_Int32 >::max()) + && (m_rStream.write(pbuffer, n) == static_cast< sal_Int32 >(n)); } sal_Int32 OStream::write(IPositionableStream::Offset offset, @@ -115,6 +118,6 @@ sal_Bool OStream::isEof() const IPositionableStream::Offset OStream::getOffset() const { - return (OStream::getOffset()); + return (m_rStream.getOffset()); } |