From 7c704c78d3c652504c064b4ac7af55a2c1ee49bb Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 21 Jan 2012 15:21:16 +0100 Subject: 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. --- xmlscript/source/xml_helper/xml_impctx.cxx | 2 +- xmlscript/source/xmldlg_imexp/exp_share.hxx | 3 +-- xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx | 3 +-- xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) (limited to 'xmlscript') diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx index a8a9e68d7077..5b6315cda78c 100644 --- a/xmlscript/source/xml_helper/xml_impctx.cxx +++ b/xmlscript/source/xml_helper/xml_impctx.cxx @@ -892,7 +892,7 @@ Reference< xml::sax::XDocumentHandler > SAL_CALL createDocumentHandler( //------------------------------------------------------------------------------ Reference< XInterface > SAL_CALL create_DocumentHandlerImpl( - Reference< XComponentContext > const & ) + SAL_UNUSED_PARAMETER Reference< XComponentContext > const & ) SAL_THROW( (Exception) ) { return static_cast< ::cppu::OWeakObject * >( diff --git a/xmlscript/source/xmldlg_imexp/exp_share.hxx b/xmlscript/source/xmldlg_imexp/exp_share.hxx index 50a9d2393393..89a4ee013173 100644 --- a/xmlscript/source/xmldlg_imexp/exp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/exp_share.hxx @@ -166,8 +166,7 @@ public: { addAttribute( rAttrName, ::rtl::OUString::valueOf(bValue) ); } void addNumberFormatAttr( css::uno::Reference< css::beans::XPropertySet > - const & xFormatProperties, - ::rtl::OUString const & rAttrName ); + const & xFormatProperties ); void readEvents() SAL_THROW( (css::uno::Exception) ); void readDialogModel( StyleBag * all_styles ) diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx index 9bbaeed3f650..1c3432f99b1d 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx @@ -1135,8 +1135,7 @@ void ElementDescriptor::readFormattedFieldModel( StyleBag * all_styles ) if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("FormatsSupplier") ) ) >>= xSupplier) { addNumberFormatAttr( - xSupplier->getNumberFormats()->getByKey( nKey ), - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-min") ) ); + xSupplier->getNumberFormats()->getByKey( nKey ) ); } } readBoolAttr( diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index 031ac053154a..2084860bbc58 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -572,8 +572,7 @@ Reference< xml::sax::XAttributeList > Style::createElement() //__________________________________________________________________________________________________ void ElementDescriptor::addNumberFormatAttr( - Reference< beans::XPropertySet > const & xFormatProperties, - OUString const & /*rAttrName*/ ) + Reference< beans::XPropertySet > const & xFormatProperties ) { Reference< beans::XPropertyState > xState( xFormatProperties, UNO_QUERY ); OUString sFormat; -- cgit