From 2beeeea4ea3a5799921674310712aa3ead9acd7a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 8 Sep 2015 18:26:13 +0200 Subject: Get rid of OSL_UNUSED In many cases it was originally used to silence warnings about variables used only in OSL_ENSURE etc., but that's no longer necessary since OSL_ENSURE is based on SAL_WARN etc. In some other cases it was apparently used as a speculative debugging aid, to have a value assigned to a variable to be easily able to view the value in a debugger. And in some cases it was used with (otherwise ignored) return values of (typically SQL-related) function calls, but it is probably better to eventually find and fix all the problematic ones among such calls via function declarations annotated SAL_WARN_UNUSED_RESULT. Change-Id: Ib925b38da70073b546fdcd00fa8524dc302accbf --- connectivity/source/commontools/dbcharset.cxx | 1 - connectivity/source/commontools/dbtools.cxx | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'connectivity/source/commontools') diff --git a/connectivity/source/commontools/dbcharset.cxx b/connectivity/source/commontools/dbcharset.cxx index f8267bf4d2e4..c9d41d80611a 100644 --- a/connectivity/source/commontools/dbcharset.cxx +++ b/connectivity/source/commontools/dbcharset.cxx @@ -70,7 +70,6 @@ namespace dbtools bool bIsMimeEncoding = 0 != ( _rInfo.Flags & RTL_TEXTENCODING_INFO_MIME ); OSL_ENSURE( !bIsMimeEncoding || rtl_getMimeCharsetFromTextEncoding( _eEncoding ), "OCharsetMap::OCharsetMap: inconsistence in rtl!" ); - OSL_UNUSED( _eEncoding ); return bIsMimeEncoding; } diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index 43e524423888..593f7012359c 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -983,9 +983,8 @@ try { xNewProps->setPropertyValue(pResult->Name, xOldProps->getPropertyValue(pResult->Name)); } - catch(IllegalArgumentException& e) + catch(IllegalArgumentException&) { - OSL_UNUSED( e ); #ifdef DBG_UTIL OUString sMessage = "TransferFormComponentProperties : could not transfer the value for property \"" + pResult->Name + -- cgit