summaryrefslogtreecommitdiffstats
path: root/comphelper/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-18 10:58:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-19 09:40:59 +0200
commitd0feba06767cfa3adce2db8d6bc87bc969418d28 (patch)
tree805389d415843b42b253853f06b9ed005f51b25d /comphelper/source
parentcid#1448295 Unchecked return value (diff)
downloadcore-d0feba06767cfa3adce2db8d6bc87bc969418d28.tar.gz
core-d0feba06767cfa3adce2db8d6bc87bc969418d28.zip
cid#1448429 Unchecked return value
Change-Id: Iddbd6bc2126943752e2057b749fd6f9943261be7 Reviewed-on: https://gerrit.libreoffice.org/75888 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'comphelper/source')
-rw-r--r--comphelper/source/streaming/oslfile2streamwrap.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/comphelper/source/streaming/oslfile2streamwrap.cxx b/comphelper/source/streaming/oslfile2streamwrap.cxx
index c69473a60943..14441d61f76f 100644
--- a/comphelper/source/streaming/oslfile2streamwrap.cxx
+++ b/comphelper/source/streaming/oslfile2streamwrap.cxx
@@ -66,7 +66,6 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readBytes(css::uno::Sequence< sal_Int8
return sal::static_int_cast< sal_Int32 >(nRead);
}
-
sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead)
{
if (!m_pFile)
@@ -78,7 +77,6 @@ sal_Int32 SAL_CALL OSLInputStreamWrapper::readSomeBytes(css::uno::Sequence< sal_
return readBytes(aData, nMaxBytesToRead);
}
-
void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -86,17 +84,16 @@ void SAL_CALL OSLInputStreamWrapper::skipBytes(sal_Int32 nBytesToSkip)
throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this));
sal_uInt64 nCurrentPos;
- m_pFile->getPos(nCurrentPos);
+ FileBase::RC eError = m_pFile->getPos(nCurrentPos);
+ if (eError != FileBase::E_None)
+ throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this));
sal_uInt64 nNewPos = nCurrentPos + nBytesToSkip;
- FileBase::RC eError = m_pFile->setPos(osl_Pos_Absolut, nNewPos);
+ eError = m_pFile->setPos(osl_Pos_Absolut, nNewPos);
if (eError != FileBase::E_None)
- {
throw css::io::NotConnectedException(OUString(), static_cast<css::uno::XWeak*>(this));
- }
}
-
sal_Int32 SAL_CALL OSLInputStreamWrapper::available()
{
::osl::MutexGuard aGuard( m_aMutex );