diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-18 10:39:48 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-01-18 12:50:09 +0000 |
commit | a7f6efc68ba97db98ebab9ebc473bffb8ded757f (patch) | |
tree | bad37ce9ee1c9f61f1c8541a9689ecdea8c84c08 /desktop | |
parent | a08745551370a052bfb6b91335956ababf435791 (diff) |
loplugin: unused return values
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af
Reviewed-on: https://gerrit.libreoffice.org/21571
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/dp_persmap.cxx | 13 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 6 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/inc/dp_persmap.h | 2 |
4 files changed, 10 insertions, 13 deletions
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx index 010c0f55ec81..d032153cf8dc 100644 --- a/desktop/source/deployment/dp_persmap.cxx +++ b/desktop/source/deployment/dp_persmap.cxx @@ -158,7 +158,7 @@ void PersistentMap::open() } -bool PersistentMap::readAll() +void PersistentMap::readAll() { // prepare for re-reading the map-file const osl::FileBase::RC nRes = m_MapFile.setPos( osl_Pos_Absolut, 0); @@ -171,11 +171,11 @@ bool PersistentMap::readAll() m_MapFile.read( aHeaderBytes, sizeof(aHeaderBytes), nBytesRead); OSL_ASSERT( nBytesRead == sizeof(aHeaderBytes)); if( nBytesRead != sizeof(aHeaderBytes)) - return false; + return; // check header magic for( int i = 0; i < (int)sizeof(PmapMagic); ++i) if( aHeaderBytes[i] != PmapMagic[i]) - return false; + return; // read key value pairs and add them to the map ByteSequence aKeyLine; @@ -185,11 +185,11 @@ bool PersistentMap::readAll() // read key-value line pair // an empty key name indicates the end of the line pairs if( m_MapFile.readLine( aKeyLine) != osl::File::E_None) - return false; + return; if( !aKeyLine.getLength()) break; if( m_MapFile.readLine( aValLine) != osl::File::E_None) - return false; + return; // decode key and value strings const OString aKeyName = decodeString( reinterpret_cast<char const *>(aKeyLine.getConstArray()), aKeyLine.getLength()); const OString aValName = decodeString( reinterpret_cast<char const *>(aValLine.getConstArray()), aValLine.getLength()); @@ -198,13 +198,12 @@ bool PersistentMap::readAll() // check end-of-file status sal_Bool bIsEOF = true; if( m_MapFile.isEndOfFile( &bIsEOF) != osl::File::E_None ) - return false; + return; if( bIsEOF ) break; } m_bIsDirty = false; - return true; } void PersistentMap::flush() diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index a76eceb5e01d..34b3fc25f427 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -919,7 +919,7 @@ void ExtensionBox_Impl::addEventListenerOnce( } -long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > &xPackage, +void ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > &xPackage, bool bLicenseMissing ) { long nPos = 0; @@ -930,7 +930,7 @@ long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > & // Don't add empty entries if ( pEntry->m_sTitle.isEmpty() ) - return 0; + return; ::osl::ClearableMutexGuard guard(m_entriesMutex); if ( m_vEntries.empty() ) @@ -969,8 +969,6 @@ long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > & Invalidate(); m_bNeedsRecalc = true; - - return nPos; } diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index eaf4f401554c..1f927f31ee6b 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -191,7 +191,7 @@ public: virtual void selectEntry( const long nPos ); - long addEntry(const css::uno::Reference<css::deployment::XPackage> &xPackage, + void addEntry(const css::uno::Reference<css::deployment::XPackage> &xPackage, bool bLicenseMissing = false ); void updateEntry(const css::uno::Reference<css::deployment::XPackage> &xPackage ); void removeEntry(const css::uno::Reference<css::deployment::XPackage> &xPackage ); diff --git a/desktop/source/deployment/inc/dp_persmap.h b/desktop/source/deployment/inc/dp_persmap.h index c18b2c827b15..d40aed40d062 100644 --- a/desktop/source/deployment/inc/dp_persmap.h +++ b/desktop/source/deployment/inc/dp_persmap.h @@ -55,7 +55,7 @@ public: protected: void open(); - bool readAll(); + void readAll(); void add( OString const & key, OString const & value ); void flush(); }; |