summaryrefslogtreecommitdiff
path: root/autodoc
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 /autodoc
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 'autodoc')
-rw-r--r--autodoc/inc/ary/idl/i_ce2s.hxx3
-rw-r--r--autodoc/inc/ary_i/d_token.hxx6
-rw-r--r--autodoc/source/ary/idl/i_ce.cxx2
-rw-r--r--autodoc/source/ary/idl/i_ce2s.cxx2
-rw-r--r--autodoc/source/ary/idl/ia_type.cxx11
-rw-r--r--autodoc/source/display/idl/hi_linkhelper.cxx2
-rw-r--r--autodoc/source/display/inc/toolkit/out_position.hxx6
-rw-r--r--autodoc/source/display/toolkit/out_position.cxx5
-rw-r--r--autodoc/source/exes/adc_uni/adc_msg.cxx18
-rw-r--r--autodoc/source/inc/adc_msg.hxx3
-rw-r--r--autodoc/source/parser_i/idl/pe_const.cxx10
-rw-r--r--autodoc/source/parser_i/idl/pe_enum2.cxx8
-rw-r--r--autodoc/source/parser_i/idl/pe_evalu.cxx6
-rw-r--r--autodoc/source/parser_i/idl/pe_func2.cxx2
-rw-r--r--autodoc/source/parser_i/idl/pe_iface.cxx18
-rw-r--r--autodoc/source/parser_i/idl/pe_tydf2.cxx8
-rw-r--r--autodoc/source/parser_i/idoc/docu_pe2.cxx4
-rw-r--r--autodoc/source/parser_i/inc/s2_luidl/pe_func2.hxx4
18 files changed, 60 insertions, 58 deletions
diff --git a/autodoc/inc/ary/idl/i_ce2s.hxx b/autodoc/inc/ary/idl/i_ce2s.hxx
index 09774d36e09f..87c9c411ab65 100644
--- a/autodoc/inc/ary/idl/i_ce2s.hxx
+++ b/autodoc/inc/ary/idl/i_ce2s.hxx
@@ -54,8 +54,7 @@ class Ce_2s
Ce_2s() {}
virtual ~Ce_2s();
- static DYN Ce_2s * Create_(
- ClassId i_nCeClass );
+ static DYN Ce_2s * Create_();
// OPERATIONS
void Add_Link2DescriptionInManual(
const String & i_link,
diff --git a/autodoc/inc/ary_i/d_token.hxx b/autodoc/inc/ary_i/d_token.hxx
index dd1133658086..7247de6e9038 100644
--- a/autodoc/inc/ary_i/d_token.hxx
+++ b/autodoc/inc/ary_i/d_token.hxx
@@ -116,8 +116,7 @@ class DT_MLTag : public DT_Dsapi
class DT_MupType : public DT_MLTag
{
public:
- explicit DT_MupType( /// Constructor for End-Tag
- bool ) /// Must be there, but is not evaluated.
+ explicit DT_MupType() /// Constructor for End-Tag
: bIsBegin(false) {}
explicit DT_MupType( /// Constructor for Begin-Tag
const String & i_sScope )
@@ -138,8 +137,7 @@ class DT_MupType : public DT_MLTag
class DT_MupMember : public DT_MLTag
{
public:
- explicit DT_MupMember( /// Constructor for End-Tag
- bool ) /// Must be there, but is not evaluated.
+ explicit DT_MupMember() /// Constructor for End-Tag
: bIsBegin(false) {}
DT_MupMember( /// Constructor for Begin-Tag
const String & i_sScope )
diff --git a/autodoc/source/ary/idl/i_ce.cxx b/autodoc/source/ary/idl/i_ce.cxx
index 8a0de924b47c..a7f72b90dda1 100644
--- a/autodoc/source/ary/idl/i_ce.cxx
+++ b/autodoc/source/ary/idl/i_ce.cxx
@@ -61,7 +61,7 @@ CodeEntity::Secondaries()
{
if (p2s)
return *p2s;
- p2s = Ce_2s::Create_(AryClass());
+ p2s = Ce_2s::Create_();
return *p2s;
}
diff --git a/autodoc/source/ary/idl/i_ce2s.cxx b/autodoc/source/ary/idl/i_ce2s.cxx
index 9a126fd312e2..a6197bb22249 100644
--- a/autodoc/source/ary/idl/i_ce2s.cxx
+++ b/autodoc/source/ary/idl/i_ce2s.cxx
@@ -53,7 +53,7 @@ Ce_2s::~Ce_2s()
}
DYN Ce_2s *
-Ce_2s::Create_( ClassId )
+Ce_2s::Create_()
{
return new Ce_2s;
}
diff --git a/autodoc/source/ary/idl/ia_type.cxx b/autodoc/source/ary/idl/ia_type.cxx
index c029c8e1e877..9bc03386493d 100644
--- a/autodoc/source/ary/idl/ia_type.cxx
+++ b/autodoc/source/ary/idl/ia_type.cxx
@@ -52,9 +52,7 @@ namespace idl
{
String MakeTemplateName(
- const String & i_localName,
- const std::vector<Type_id> &
- i_templateParameters );
+ const String & i_localName );
@@ -130,9 +128,7 @@ TypeAdmin::lhf_CheckIn_TypeName( const String & i_sLocalName,
? (!i_templateParameters->empty())
: false )
{
- sSearchLocalName = MakeTemplateName(
- i_sLocalName,
- *i_templateParameters);
+ sSearchLocalName = MakeTemplateName(i_sLocalName);
}
Type_id
@@ -344,8 +340,7 @@ TypeAdmin::IsBuiltInOrRelated( const Type & i_rType ) const
String
-MakeTemplateName( const String & i_localName,
- const std::vector<Type_id> & )
+MakeTemplateName( const String & i_localName )
{
StreamLock
sl(200);
diff --git a/autodoc/source/display/idl/hi_linkhelper.cxx b/autodoc/source/display/idl/hi_linkhelper.cxx
index 4d6ae7a735ad..de67f0d9a0b9 100644
--- a/autodoc/source/display/idl/hi_linkhelper.cxx
+++ b/autodoc/source/display/idl/hi_linkhelper.cxx
@@ -89,7 +89,7 @@ LinkHelper::XrefsSuffix() const
String
-nameChainLinker( const char * )
+nameChainLinker( SAL_UNUSED_PARAMETER const char * )
{
static const String
sModuleFileName_( output::ModuleFileName() );
diff --git a/autodoc/source/display/inc/toolkit/out_position.hxx b/autodoc/source/display/inc/toolkit/out_position.hxx
index 0bc236cdf871..33dd32313923 100644
--- a/autodoc/source/display/inc/toolkit/out_position.hxx
+++ b/autodoc/source/display/inc/toolkit/out_position.hxx
@@ -73,16 +73,14 @@ class Position
void Get_Chain(
StringVector & o_result ) const
{ pDirectory->Get_Chain(o_result); }
- String LinkToRoot(
- const String & i_localLabel = String::Null_() ) const;
+ String LinkToRoot() const;
void Get_LinkTo(
StreamStr & o_result,
const Position & i_destination,
const String & i_localLabel = String::Null_() ) const;
void Get_LinkToRoot(
- StreamStr & o_result,
- const String & i_localLabel = String::Null_() ) const;
+ StreamStr & o_result ) const;
static char Delimiter() { return '/'; }
diff --git a/autodoc/source/display/toolkit/out_position.cxx b/autodoc/source/display/toolkit/out_position.cxx
index efb4495fb0b4..75e51b0ce5a8 100644
--- a/autodoc/source/display/toolkit/out_position.cxx
+++ b/autodoc/source/display/toolkit/out_position.cxx
@@ -131,7 +131,7 @@ Position::operator-=( intt i_levels )
}
String
-Position::LinkToRoot( const String & ) const
+Position::LinkToRoot() const
{
StreamLock sl(C_nAssumedMaxLinkLength);
return sl() << get_UpLink(Depth()) << c_str;
@@ -176,8 +176,7 @@ Position::Get_LinkTo( StreamStr & o_result,
}
void
-Position::Get_LinkToRoot( StreamStr & o_result,
- const String & ) const
+Position::Get_LinkToRoot( StreamStr & o_result ) const
{
o_result << get_UpLink(Depth());
}
diff --git a/autodoc/source/exes/adc_uni/adc_msg.cxx b/autodoc/source/exes/adc_uni/adc_msg.cxx
index ad8b9d5745f0..06d6f8e76dde 100644
--- a/autodoc/source/exes/adc_uni/adc_msg.cxx
+++ b/autodoc/source/exes/adc_uni/adc_msg.cxx
@@ -62,28 +62,23 @@ Messages::WriteFile(const String & i_sOutputFilePath)
// KORR_FUTURE Enable this when appropriate:
WriteParagraph( aOut,
aParseErrors,
- "Incompletely Parsed Files",
- "Stopped parsing at " );
+ "Incompletely Parsed Files" );
WriteParagraph( aOut,
aMissingDocs,
- "Entities Without Documentation",
- " in " );
+ "Entities Without Documentation" );
WriteParagraph( aOut,
aInvalidConstSymbols,
- "Incorrectly Written Const Symbols",
- " in " );
+ "Incorrectly Written Const Symbols" );
WriteParagraph( aOut,
aUnresolvedLinks,
- "Unresolved Links",
- " in\n " );
+ "Unresolved Links" );
WriteParagraph( aOut,
aTypeVsMemberMisuses,
- "Confusion or Misuse of <Type> vs. <Member>",
- " in " );
+ "Confusion or Misuse of <Type> vs. <Member>" );
aOut.close();
}
@@ -164,8 +159,7 @@ Messages::AddValue( MessageMap & o_dest,
void
Messages::WriteParagraph( csv::File & o_out,
const MessageMap & i_source,
- const String & i_title,
- const String & )
+ const String & i_title )
{
StreamStr aLine(2000);
diff --git a/autodoc/source/inc/adc_msg.hxx b/autodoc/source/inc/adc_msg.hxx
index e88ccf5ce526..55abd5419b78 100644
--- a/autodoc/source/inc/adc_msg.hxx
+++ b/autodoc/source/inc/adc_msg.hxx
@@ -115,8 +115,7 @@ class Messages
void WriteParagraph(
csv::File & o_out,
const MessageMap & i_source,
- const String & i_title,
- const String & i_firstIntermediateText );
+ const String & i_title );
// DATA
MessageMap aMissingDocs;
diff --git a/autodoc/source/parser_i/idl/pe_const.cxx b/autodoc/source/parser_i/idl/pe_const.cxx
index 4013f33d02d7..817060e6e0ce 100644
--- a/autodoc/source/parser_i/idl/pe_const.cxx
+++ b/autodoc/source/parser_i/idl/pe_const.cxx
@@ -26,6 +26,10 @@
*
************************************************************************/
+#include "sal/config.h"
+
+#include "sal/types.h"
+
#include <precomp.h>
#include <s2_luidl/pe_const.hxx>
@@ -160,7 +164,7 @@ PE_Constant::On_expect_curl_bracket_open_Punctuation(const char * i_sText)
}
void
-PE_Constant::On_expect_const_Stereotype(const char *)
+PE_Constant::On_expect_const_Stereotype(SAL_UNUSED_PARAMETER const char *)
{
SetResult( done, push_sure, pPE_Type.Ptr() );
}
@@ -180,7 +184,7 @@ PE_Constant::On_expect_const_Punctuation(const char * i_sText)
}
void
-PE_Constant::On_expect_value_Identifier(const char *)
+PE_Constant::On_expect_value_Identifier(SAL_UNUSED_PARAMETER const char *)
{
SetResult( not_done, push_sure, pPE_Value.Ptr() );
}
@@ -200,7 +204,7 @@ PE_Constant::On_expect_finish_Punctuation(const char * i_sText)
}
void
-PE_Constant::On_Default(const char * )
+PE_Constant::On_Default(SAL_UNUSED_PARAMETER const char * )
{
SetResult(not_done,pop_failure);
eState = e_none;
diff --git a/autodoc/source/parser_i/idl/pe_enum2.cxx b/autodoc/source/parser_i/idl/pe_enum2.cxx
index 68fb46d48a56..ce8a8067ca7c 100644
--- a/autodoc/source/parser_i/idl/pe_enum2.cxx
+++ b/autodoc/source/parser_i/idl/pe_enum2.cxx
@@ -26,6 +26,10 @@
*
************************************************************************/
+#include "sal/config.h"
+
+#include "sal/types.h"
+
#include <precomp.h>
#include <s2_luidl/pe_enum2.hxx>
@@ -160,7 +164,7 @@ PE_Enum::On_expect_value_Punctuation(const char * i_sText)
}
void
-PE_Enum::On_expect_value_Identifier(const char *)
+PE_Enum::On_expect_value_Identifier(SAL_UNUSED_PARAMETER const char *)
{
SetResult( not_done, push_sure, pPE_Value.Ptr() );
}
@@ -180,7 +184,7 @@ PE_Enum::On_expect_finish_Punctuation(const char * i_sText)
}
void
-PE_Enum::On_Default(const char * )
+PE_Enum::On_Default(SAL_UNUSED_PARAMETER const char * )
{
SetResult(not_done,pop_failure);
eState = e_none;
diff --git a/autodoc/source/parser_i/idl/pe_evalu.cxx b/autodoc/source/parser_i/idl/pe_evalu.cxx
index 4e1aafabb10b..6ce7c91a1b89 100644
--- a/autodoc/source/parser_i/idl/pe_evalu.cxx
+++ b/autodoc/source/parser_i/idl/pe_evalu.cxx
@@ -26,6 +26,10 @@
*
************************************************************************/
+#include "sal/config.h"
+
+#include "sal/types.h"
+
#include <precomp.h>
#include <s2_luidl/pe_evalu.hxx>
@@ -151,7 +155,7 @@ PE_Value::On_got_name_Assignment(const char * i_sText)
}
void
-PE_Value::On_Default(const char * )
+PE_Value::On_Default(SAL_UNUSED_PARAMETER const char * )
{
SetResult(not_done,pop_failure);
}
diff --git a/autodoc/source/parser_i/idl/pe_func2.cxx b/autodoc/source/parser_i/idl/pe_func2.cxx
index 64a0c6d65736..a091fa72811a 100644
--- a/autodoc/source/parser_i/idl/pe_func2.cxx
+++ b/autodoc/source/parser_i/idl/pe_func2.cxx
@@ -72,7 +72,7 @@ PE_Function::PE_Function( const RParent & i_rCurInterface )
}
PE_Function::PE_Function( const RParent & i_rCurService,
- E_Constructor )
+ E_Constructor )
: eState(expect_name),
sData_Name(),
nData_ReturnType(0),
diff --git a/autodoc/source/parser_i/idl/pe_iface.cxx b/autodoc/source/parser_i/idl/pe_iface.cxx
index 404c303d2c04..7a94938d518f 100644
--- a/autodoc/source/parser_i/idl/pe_iface.cxx
+++ b/autodoc/source/parser_i/idl/pe_iface.cxx
@@ -187,7 +187,7 @@ PE_Interface::Process_Default()
void
-PE_Interface::On_need_uik_MetaType(const char *)
+PE_Interface::On_need_uik_MetaType(SAL_UNUSED_PARAMETER const char *)
{
// Deprecated, data will be ignored
SetResult(done, stay);
@@ -195,7 +195,7 @@ PE_Interface::On_need_uik_MetaType(const char *)
}
void
-PE_Interface::On_uik_Identifier(const char *)
+PE_Interface::On_uik_Identifier(SAL_UNUSED_PARAMETER const char *)
{
// Deprecated, data will be ignored
SetResult(done, stay);
@@ -213,14 +213,14 @@ PE_Interface::On_uik_Punctuation(const char * i_sText)
}
void
-PE_Interface::On_need_ident_MetaType(const char *)
+PE_Interface::On_need_ident_MetaType(SAL_UNUSED_PARAMETER const char *)
{
SetResult(done, stay);
eState = ident;
}
void
-PE_Interface::On_ident_Identifier(const char *)
+PE_Interface::On_ident_Identifier(SAL_UNUSED_PARAMETER const char *)
{
SetResult(done, stay);
}
@@ -236,7 +236,7 @@ PE_Interface::On_ident_Punctuation(const char * i_sText)
}
void
-PE_Interface::On_need_interface_MetaType(const char *)
+PE_Interface::On_need_interface_MetaType(SAL_UNUSED_PARAMETER const char *)
{
SetResult(done, stay);
eState = need_name;
@@ -343,21 +343,21 @@ PE_Interface::On_std_Stereotype(const char * i_sText)
}
void
-PE_Interface::On_std_GotoFunction(const char * )
+PE_Interface::On_std_GotoFunction(SAL_UNUSED_PARAMETER const char * )
{
SetResult(not_done, push_sure, pPE_Function.Ptr());
eState = in_function;
}
void
-PE_Interface::On_std_GotoAttribute(const char * )
+PE_Interface::On_std_GotoAttribute(SAL_UNUSED_PARAMETER const char * )
{
SetResult(not_done, push_sure, pPE_Attribute.Ptr());
eState = in_attribute;
}
void
-PE_Interface::On_std_GotoBaseInterface(const char * )
+PE_Interface::On_std_GotoBaseInterface(SAL_UNUSED_PARAMETER const char * )
{
SetResult(done, push_sure, pPE_Type.Ptr());
eState = in_base_interface;
@@ -379,7 +379,7 @@ PE_Interface::On_need_finish_Punctuation(const char * i_sText)
}
void
-PE_Interface::On_Default(const char *)
+PE_Interface::On_Default(SAL_UNUSED_PARAMETER const char *)
{
SetResult(not_done, pop_failure);
}
diff --git a/autodoc/source/parser_i/idl/pe_tydf2.cxx b/autodoc/source/parser_i/idl/pe_tydf2.cxx
index 310a8f57327b..0f5d1df0a999 100644
--- a/autodoc/source/parser_i/idl/pe_tydf2.cxx
+++ b/autodoc/source/parser_i/idl/pe_tydf2.cxx
@@ -26,6 +26,10 @@
*
************************************************************************/
+#include "sal/config.h"
+
+#include "sal/types.h"
+
#include <precomp.h>
#include <s2_luidl/pe_tydf2.hxx>
@@ -120,7 +124,7 @@ PE_Typedef::Process_Default()
}
void
-PE_Typedef::On_expect_description_Any(const char *)
+PE_Typedef::On_expect_description_Any(SAL_UNUSED_PARAMETER const char *)
{
SetResult(not_done,push_sure, pPE_Type.Ptr());
}
@@ -146,7 +150,7 @@ PE_Typedef::On_got_name_Punctuation(const char * i_sText)
}
void
-PE_Typedef::On_Default(const char * )
+PE_Typedef::On_Default(SAL_UNUSED_PARAMETER const char * )
{
SetResult(not_done,pop_failure);
}
diff --git a/autodoc/source/parser_i/idoc/docu_pe2.cxx b/autodoc/source/parser_i/idoc/docu_pe2.cxx
index ec18bc75bd60..8a7eeb220301 100644
--- a/autodoc/source/parser_i/idoc/docu_pe2.cxx
+++ b/autodoc/source/parser_i/idoc/docu_pe2.cxx
@@ -229,10 +229,10 @@ SapiDocu_PE::Process_XmlLink_EndTag( const Tok_XmlLink_EndTag & i_rToken )
(this->*fCurTokenAddFunction)(*new DT_Style("</b>",false));
break;
case Tok_XmlLink_Tag::member:
- (this->*fCurTokenAddFunction)(*new DT_MupMember(true));
+ (this->*fCurTokenAddFunction)(*new DT_MupMember);
break;
case Tok_XmlLink_Tag::type:
- (this->*fCurTokenAddFunction)(*new DT_MupType(true));
+ (this->*fCurTokenAddFunction)(*new DT_MupType);
break;
default:
// Do nothing.
diff --git a/autodoc/source/parser_i/inc/s2_luidl/pe_func2.hxx b/autodoc/source/parser_i/inc/s2_luidl/pe_func2.hxx
index c39d4f553073..d59ef43e707d 100644
--- a/autodoc/source/parser_i/inc/s2_luidl/pe_func2.hxx
+++ b/autodoc/source/parser_i/inc/s2_luidl/pe_func2.hxx
@@ -29,6 +29,10 @@
#ifndef ADC_UIDL_PE_FUNC2_HXX
#define ADC_UIDL_PE_FUNC2_HXX
+#include "sal/config.h"
+
+#include "sal/types.h"
+
// USED SERVICES
// BASE CLASSES
#include <s2_luidl/parsenv2.hxx>