summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorMartyn Russell <martyn@lanedo.com>2012-06-07 18:35:07 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-06-12 12:08:33 +0100
commit4019acf2974b58210ffc1b1975720553e7b5d337 (patch)
treed290a4593c8c369281392f2504974e27b522ac77 /framework
parentcb0450899ddb2ea75d6a6fcf630f41292af64330 (diff)
cppcheck: avoid unreachable code warnings
Change-Id: I1d126eb10bfebc747d4bb6d153b80abe73a1e81e
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/autorecovery.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 3249d03975df..a5e2bd2c890d 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1331,11 +1331,11 @@ void AutoRecovery::implts_flushConfigItem(const AutoRecovery::TDocumentInfo& rIn
css::uno::Reference< css::util::XChangesBatch > xFlush(xCFG, css::uno::UNO_QUERY_THROW);
xFlush->commitChanges();
- #ifdef TRIGGER_FULL_DISC_CHECK
+#ifdef TRIGGER_FULL_DISC_CHECK
throw css::uno::Exception();
- #endif
-
+#else // TRIGGER_FULL_DISC_CHECK
nRetry = 0;
+#endif // TRIGGER_FULL_DISC_CHECK
}
catch(const css::uno::Exception&)
{
@@ -2363,12 +2363,13 @@ void AutoRecovery::implts_saveOneDoc(const ::rtl::OUString&
{
xDocRecover->storeToRecoveryFile( rInfo.NewTempURL, lNewArgs.getAsConstPropertyValueList() );
- #ifdef TRIGGER_FULL_DISC_CHECK
+#ifdef TRIGGER_FULL_DISC_CHECK
throw css::uno::Exception();
- #endif
+#else // TRIGGER_FULL_DISC_CHECK
bError = sal_False;
nRetry = 0;
+#endif // TRIGGER_FULL_DISC_CHECK
}
catch(const css::uno::Exception&)
{
@@ -3454,10 +3455,9 @@ void AutoRecovery::implts_verifyCacheAgainstDesktopDocumentList()
//-----------------------------------------------
sal_Bool AutoRecovery::impl_enoughDiscSpace(sal_Int32 nRequiredSpace)
{
- #ifdef SIMULATE_FULL_DISC
+#ifdef SIMULATE_FULL_DISC
return sal_False;
- #endif
-
+#else // SIMULATE_FULL_DISC
// In case an error occures and we are not able to retrieve the needed information
// it's better to "disable" the feature ShowErrorOnFullDisc !
// Otherwhise we start a confusing process of error handling ...
@@ -3478,6 +3478,7 @@ sal_Bool AutoRecovery::impl_enoughDiscSpace(sal_Int32 nRequiredSpace)
sal_uInt64 nFreeMB = (nFreeSpace/1048576);
return (nFreeMB >= (sal_uInt64)nRequiredSpace);
+#endif // SIMULATE_FULL_DISC
}
//-----------------------------------------------