summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-21 15:21:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-21 15:21:16 +0100
commit7c704c78d3c652504c064b4ac7af55a2c1ee49bb (patch)
tree623358cf25839219ef4fd90eea4f3eaa55389a1f /shell
parent0d5167915b47df7c3e450614ea50d845ba959df3 (diff)
Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC) is used to annotate legitimately unused parameters, so that static analysis tools can tell legitimately unused parameters from truly unnecessary ones. To that end, some patches for external modules are also added, that are only applied when compiling with GCC and add necessary __attribute__ ((unused)) in headers.
Diffstat (limited to 'shell')
-rw-r--r--shell/source/backends/gconfbe/gconfbackend.cxx3
-rw-r--r--shell/source/backends/localebe/localebecdef.cxx2
-rw-r--r--shell/source/cmdmail/cmdmailentry.cxx5
-rw-r--r--shell/source/unix/exec/shellexecentry.cxx5
-rw-r--r--shell/source/unix/sysshell/recently_used_file_handler.cxx4
5 files changed, 13 insertions, 6 deletions
diff --git a/shell/source/backends/gconfbe/gconfbackend.cxx b/shell/source/backends/gconfbe/gconfbackend.cxx
index bff67fa6ff03..ac5e93635fca 100644
--- a/shell/source/backends/gconfbe/gconfbackend.cxx
+++ b/shell/source/backends/gconfbe/gconfbackend.cxx
@@ -206,7 +206,8 @@ css::uno::Any Service::getPropertyValue(rtl::OUString const & PropertyName)
}
css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(
- css::uno::Reference< css::uno::XComponentContext > const &)
+ SAL_UNUSED_PARAMETER css::uno::Reference< css::uno::XComponentContext >
+ const &)
{
return static_cast< cppu::OWeakObject * >(new Service);
}
diff --git a/shell/source/backends/localebe/localebecdef.cxx b/shell/source/backends/localebe/localebecdef.cxx
index 1d08c0dfd751..620321003720 100644
--- a/shell/source/backends/localebe/localebecdef.cxx
+++ b/shell/source/backends/localebe/localebecdef.cxx
@@ -39,7 +39,7 @@ namespace lang = css::lang ;
//------------------------------------------------------------------------------
static uno::Reference<uno::XInterface> SAL_CALL createLocaleBackend(
- const uno::Reference<uno::XComponentContext>&){
+ SAL_UNUSED_PARAMETER const uno::Reference<uno::XComponentContext>&){
return * LocaleBackend::createInstance();
}
diff --git a/shell/source/cmdmail/cmdmailentry.cxx b/shell/source/cmdmail/cmdmailentry.cxx
index 804bc8880d54..cdad68b5339e 100644
--- a/shell/source/cmdmail/cmdmailentry.cxx
+++ b/shell/source/cmdmail/cmdmailentry.cxx
@@ -70,7 +70,10 @@ extern "C"
// component_getFactory
//----------------------------------------------------------------------
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* /*pSrvManager*/, uno_Interface* /*pRegistryKey*/ )
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
+ const sal_Char* pImplName,
+ SAL_UNUSED_PARAMETER uno_Interface* /*pSrvManager*/,
+ SAL_UNUSED_PARAMETER uno_Interface* /*pRegistryKey*/ )
{
Reference< XSingleComponentFactory > xFactory;
diff --git a/shell/source/unix/exec/shellexecentry.cxx b/shell/source/unix/exec/shellexecentry.cxx
index dcca511be747..4fcc214b7615 100644
--- a/shell/source/unix/exec/shellexecentry.cxx
+++ b/shell/source/unix/exec/shellexecentry.cxx
@@ -69,7 +69,10 @@ extern "C"
// component_getFactory
//----------------------------------------------------------------------
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* /*pSrvManager*/, uno_Interface* /*pRegistryKey*/ )
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
+ const sal_Char* pImplName,
+ SAL_UNUSED_PARAMETER uno_Interface* /*pSrvManager*/,
+ SAL_UNUSED_PARAMETER uno_Interface* /*pRegistryKey*/ )
{
Reference< XSingleComponentFactory > xFactory;
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index 5084edb37bb7..fd8213bad65e 100644
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -102,13 +102,13 @@ namespace /* private */ {
timestamp_ = t;
}
- void set_is_private(const string_t& /*character*/)
+ void set_is_private(SAL_UNUSED_PARAMETER const string_t& /*character*/)
{ is_private_ = true; }
void set_groups(const string_t& character)
{ groups_.push_back(character); }
- void set_nothing(const string_t& /*character*/)
+ void set_nothing(SAL_UNUSED_PARAMETER const string_t& /*character*/)
{}
bool has_groups() const