summaryrefslogtreecommitdiff
path: root/sal/qa/osl
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-10-12 07:45:01 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-12 06:52:56 +0000
commitccc5ea08d64c38a9ce925d448c3010aca19ed35c (patch)
treee50c45ee596185f9a030641465796394c71ad410 /sal/qa/osl
parent898aff0d190b09d16cce866909b64cf023cba43f (diff)
cppcheck:variableScope
Change-Id: I037feb335499629300309851dcda3bb661f03d4f Reviewed-on: https://gerrit.libreoffice.org/19316 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sal/qa/osl')
-rw-r--r--sal/qa/osl/file/osl_File.cxx40
1 files changed, 20 insertions, 20 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index a99cc15b82fe..90b976591933 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -1566,32 +1566,32 @@ namespace osl_FileStatus
void check_FileType(osl::FileStatus const& _rFileStatus )
{
- bool bOK = false;
- if ( _rFileStatus.isValid(osl_FileStatus_Mask_FileName))
+ if ( _rFileStatus.isValid(osl_FileStatus_Mask_FileName))
+ {
+ rtl::OUString suFilename = _rFileStatus.getFileName();
+
+ if ( _rFileStatus.isValid(osl_FileStatus_Mask_Type))
{
- rtl::OUString suFilename = _rFileStatus.getFileName();
+ osl::FileStatus::Type eType = _rFileStatus.getFileType();
+ bool bOK = false;
- if ( _rFileStatus.isValid(osl_FileStatus_Mask_Type))
+ if ( compareFileName( suFilename, aTmpName2) )
{
- osl::FileStatus::Type eType = _rFileStatus.getFileType();
-
- if ( compareFileName( suFilename, aTmpName2) )
- {
- // regular
- bOK = ( eType == osl::FileStatus::Regular );
- }
- if ( compareFileName( suFilename, aTmpName1) )
- {
- // directory
- bOK = ( eType == ::osl::FileStatus::Directory );
- }
+ // regular
+ bOK = ( eType == osl::FileStatus::Regular );
+ }
+ if ( compareFileName( suFilename, aTmpName1) )
+ {
+ // directory
+ bOK = ( eType == ::osl::FileStatus::Directory );
+ }
- CPPUNIT_ASSERT_MESSAGE( "test for getFileType function: ",
- bOK );
- }
+ CPPUNIT_ASSERT_MESSAGE( "test for getFileType function: ",
+ bOK );
}
- // LLA: it's not a bug, if a FileStatus not exist, so no else
}
+ // LLA: it's not a bug, if a FileStatus not exist, so no else
+ }
void getFileType_002()
{