diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2015-01-10 15:52:17 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-01-12 06:45:19 +0000 |
commit | d5f48d742ac1fea9fd341244bbcea09bcd78b476 (patch) | |
tree | e68143fca184da493e368081981d666bad8bd906 /svl/source/passwordcontainer | |
parent | babe4ab629d476bbddbacb85c33436ba09655aea (diff) |
fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings.
Change-Id: I46b9293eed0cba2ebca119cc1fb0a6334ea66308
Reviewed-on: https://gerrit.libreoffice.org/13844
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svl/source/passwordcontainer')
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index aadd1f9892a8..6588a4de4b30 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -50,14 +50,13 @@ using namespace com::sun::star::ucb; static OUString createIndex( vector< OUString > lines ) { OString aResult; - const sal_Char* pLine; for( unsigned int i = 0; i < lines.size(); i++ ) { if( i ) aResult += OString( "__" ); OString line = OUStringToOString( lines[i], RTL_TEXTENCODING_UTF8 ); - pLine = line.getStr(); + const sal_Char* pLine = line.getStr(); while( *pLine ) { @@ -852,7 +851,6 @@ OUString PasswordContainer::GetMasterPassword( const Reference< XInteractionHand if( m_aMasterPasswd.isEmpty() && aHandler.is() ) { OUString aEncodedMP; - bool bAskAgain = false; bool bDefaultPassword = false; if( !m_pStorageFile->getEncodedMP( aEncodedMP ) ) @@ -865,6 +863,7 @@ OUString PasswordContainer::GetMasterPassword( const Reference< XInteractionHand if ( !bDefaultPassword ) { + bool bAskAgain = false; do { bAskAgain = false; |