loplugin:unusedvariableplus in ucb,xmlscript

Change-Id: I8fac8c7766df7c6be489280fcac2a423183429c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91790
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2020-04-07 08:46:05 +02:00
parent 97ac4de1e3
commit 7224bb9bcd
2 changed files with 5 additions and 7 deletions

View File

@@ -179,9 +179,9 @@ StorageElementFactory::createStorage( const OUString & rUri,
} }
else if ( osl_atomic_increment( &aIt->second->m_refCount ) > 1 ) else if ( osl_atomic_increment( &aIt->second->m_refCount ) > 1 )
{ {
rtl::Reference< Storage > xElement( aIt->second ); uno::Reference< embed::XStorage > xElement( aIt->second );
osl_atomic_decrement( &aIt->second->m_refCount ); osl_atomic_decrement( &aIt->second->m_refCount );
return aIt->second; return xElement;
} }
else else
{ {

View File

@@ -62,8 +62,7 @@ exportLibraryContainer(
{ {
LibDescriptor& rLib = pLibArray->mpLibs[i]; LibDescriptor& rLib = pLibArray->mpLibs[i];
XMLElement* pLibElement = new XMLElement( XMLNS_LIBRARY_PREFIX ":library" ); rtl::Reference<XMLElement> pLibElement(new XMLElement( XMLNS_LIBRARY_PREFIX ":library" ));
Reference< xml::sax::XAttributeList > xLibElementAttribs = static_cast< xml::sax::XAttributeList* >( pLibElement );
pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":name", rLib.aName ); pLibElement->addAttribute( XMLNS_LIBRARY_PREFIX ":name", rLib.aName );
@@ -119,13 +118,12 @@ exportLibrary(
for( const auto& rElementName : rLib.aElementNames ) for( const auto& rElementName : rLib.aElementNames )
{ {
XMLElement* pElement = new XMLElement( XMLNS_LIBRARY_PREFIX ":element" ); rtl::Reference<XMLElement> pElement(new XMLElement( XMLNS_LIBRARY_PREFIX ":element" ));
Reference< xml::sax::XAttributeList > xElementAttribs = static_cast< xml::sax::XAttributeList* >( pElement );
pElement->addAttribute( XMLNS_LIBRARY_PREFIX ":name", pElement->addAttribute( XMLNS_LIBRARY_PREFIX ":name",
rElementName ); rElementName );
pLibElement->addSubElement( pElement ); pLibElement->addSubElement( pElement.get() );
} }
pLibElement->dump( xOut.get() ); pLibElement->dump( xOut.get() );