Kaydet (Commit) 09978dd1 authored tarafından Noel Grandin's avatar Noel Grandin

clang-tidy bugprone-unused-return-value

In
   OStorage::openEncryptedStream
the lines were marked with a TODO until the TODO comment was removed in
    commit 8083b462
    Date:   Tue Jun 16 16:15:54 2009 +0000
    CWS-TOOLING: integrate CWS fwk103
Since no-one has "fixed" this intended functionality by now,
I just removed it.

The lines in unoidl/ were introduced by
    commit 12353c73
    Date:   Fri Mar 1 23:23:50 2013 +0100
    WIP: Experimental new binary type.rdb format
I assume that not throwing these was just an oversight.

Change-Id: I26fbcce267f2cc1154a30b8259176f59611dfbd8
Reviewed-on: https://gerrit.libreoffice.org/60161
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 7764ae70
......@@ -3142,9 +3142,6 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream(
throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
packages::NoEncryptionException();
if ( ( nOpenMode & embed::ElementModes::WRITE ) && m_pData->m_bReadOnlyWrap )
throw io::IOException( THROW_WHERE ); // TODO: access denied
......@@ -3231,9 +3228,6 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream(
throw lang::DisposedException( THROW_WHERE );
}
if ( m_pData->m_nStorageType != embed::StorageFormats::PACKAGE )
packages::NoEncryptionException();
if ( !aEncryptionData.getLength() )
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 2 );
......
......@@ -377,7 +377,7 @@ rtl::Reference< Entity > readEntity(
base = reader.getSuperTypeName(0).replace('/', '.');
break;
default:
FileFormatException(
throw FileFormatException(
key.getRegistryName(),
("legacy format: unexpected number "
+ OUString::number(reader.getSuperTypeCount())
......@@ -397,7 +397,7 @@ rtl::Reference< Entity > readEntity(
translateAnnotations(reader.getDocumentation()));
} else {
if (reader.getSuperTypeCount() != 0) {
FileFormatException(
throw FileFormatException(
key.getRegistryName(),
("legacy format: unexpected number "
+ OUString::number(reader.getSuperTypeCount())
......@@ -432,7 +432,7 @@ rtl::Reference< Entity > readEntity(
for (sal_uInt16 j = 0; j != n; ++j) {
RTConstValue v(reader.getFieldValue(j));
if (v.m_type != RT_TYPE_INT32) {
FileFormatException(
throw FileFormatException(
key.getRegistryName(),
("legacy format: unexpected type "
+ OUString::number(v.m_type) + " of value of field "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment