summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-04 14:34:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-11 09:48:10 +0200
commit49eb02f07a5af44da59008a238e828b4a9532bef (patch)
tree43c4b4eaacd79fe0bff784a4ef71f4c1080c3912 /unotools
parent5823ecd54b16974ffe8821a5ae061cd0ecc4cf84 (diff)
new loplugin:unusedvariablemore
collection of heuristics to look for local variables that are never read from i.e. do not contribute to the surrounding logic This is an expensive plugin, since it walks up the parent tree, so it is off by default. Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06 Reviewed-on: https://gerrit.libreoffice.org/52450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/viewoptions.cxx9
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx5
2 files changed, 3 insertions, 11 deletions
diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx
index a4c49a4a3373..318b021ab90b 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -55,13 +55,8 @@
}
#endif // DEBUG_VIEWOPTIONS
-#define SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION_PARAM_EXCEPTION) \
- { \
- OUStringBuffer sMsg(256); \
- sMsg.append("Unexpected exception caught. Original message was:\n\"" ); \
- sMsg.append (SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION_PARAM_EXCEPTION.Message); \
- sMsg.append("\"" ); \
- }
+#define SVTVIEWOPTIONS_LOG_UNEXPECTED_EXCEPTION(ex) \
+ SAL_WARN("unotools", "Unexpected exception caught. Original message was: " << ex.Message);
// initialization!
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 3f7731d99602..868100fe3cc3 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -705,7 +705,6 @@ static bool UCBOpenContentSync(
xListener);
}
- Any aResult;
bool bException(false);
bool bAborted(false);
bool bResultAchieved(false);
@@ -810,7 +809,6 @@ static bool UCBOpenContentSync(
case Moderator::ResultType::RESULT:
{
bResultAchieved = true;
- aResult = res.result;
break;
}
case Moderator::ResultType::COMMANDABORTED:
@@ -909,13 +907,12 @@ static bool UCBOpenContentSync_(
if ( xProps.is() )
xProps->addPropertiesChangeListener( Sequence< OUString >(), xListener );
- Any aResult;
bool bException = false;
bool bAborted = false;
try
{
- aResult = aContent.executeCommand( rArg.Name, rArg.Argument );
+ aContent.executeCommand( rArg.Name, rArg.Argument );
}
catch (const CommandAbortedException&)
{