summaryrefslogtreecommitdiffstats
path: root/sal/textenc
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 /sal/textenc
parentFix Possible inefficient checking for 'aChrSetArr' emptiness (diff)
downloadcore-7c704c78d3c652504c064b4ac7af55a2c1ee49bb.tar.gz
core-7c704c78d3c652504c064b4ac7af55a2c1ee49bb.zip
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 'sal/textenc')
-rw-r--r--sal/textenc/convertsimple.cxx11
-rw-r--r--sal/textenc/convertsinglebytetobmpunicode.cxx2
-rw-r--r--sal/textenc/tcvtbyte.cxx16
-rw-r--r--sal/textenc/tcvtmb.cxx8
-rw-r--r--sal/textenc/tcvtutf7.cxx6
-rw-r--r--sal/textenc/textcvt.cxx6
6 files changed, 26 insertions, 23 deletions
diff --git a/sal/textenc/convertsimple.cxx b/sal/textenc/convertsimple.cxx
index 939aaa3e18d2..d359a1eeef64 100644
--- a/sal/textenc/convertsimple.cxx
+++ b/sal/textenc/convertsimple.cxx
@@ -533,9 +533,9 @@ static int ImplConvertUnicodeCharToChar(
}
sal_Size sal::detail::textenc::convertCharToUnicode(
- void const * pData, void *, char const * pSrcBuf, sal_Size nSrcBytes,
- sal_Unicode * pDestBuf, sal_Size nDestChars, sal_uInt32 nFlags,
- sal_uInt32 * pInfo, sal_Size * pSrcCvtBytes)
+ void const * pData, SAL_UNUSED_PARAMETER void *, char const * pSrcBuf,
+ sal_Size nSrcBytes, sal_Unicode * pDestBuf, sal_Size nDestChars,
+ sal_uInt32 nFlags, sal_uInt32 * pInfo, sal_Size * pSrcCvtBytes)
{
sal_uChar c;
sal_Unicode cConv;
@@ -593,8 +593,9 @@ sal_Size sal::detail::textenc::convertCharToUnicode(
}
sal_Size sal::detail::textenc::convertUnicodeToChar(
- void const * pData, void *, sal_Unicode const * pSrcBuf, sal_Size nSrcChars,
- char * pDestBuf, sal_Size nDestBytes, sal_uInt32 nFlags, sal_uInt32 * pInfo,
+ void const * pData, SAL_UNUSED_PARAMETER void *,
+ sal_Unicode const * pSrcBuf, sal_Size nSrcChars, char * pDestBuf,
+ sal_Size nDestBytes, sal_uInt32 nFlags, sal_uInt32 * pInfo,
sal_Size * pSrcCvtChars)
{
sal_Unicode c;
diff --git a/sal/textenc/convertsinglebytetobmpunicode.cxx b/sal/textenc/convertsinglebytetobmpunicode.cxx
index 787dee0b7459..efbe5043b0d8 100644
--- a/sal/textenc/convertsinglebytetobmpunicode.cxx
+++ b/sal/textenc/convertsinglebytetobmpunicode.cxx
@@ -40,7 +40,7 @@
#include "unichars.hxx"
sal_Size rtl_textenc_convertSingleByteToBmpUnicode(
- void const * data, void *, sal_Char const * srcBuf,
+ void const * data, SAL_UNUSED_PARAMETER void *, sal_Char const * srcBuf,
sal_Size srcBytes, sal_Unicode * destBuf, sal_Size destChars,
sal_uInt32 flags, sal_uInt32 * info, sal_Size * srcCvtBytes)
{
diff --git a/sal/textenc/tcvtbyte.cxx b/sal/textenc/tcvtbyte.cxx
index 4861daf4aea1..d80229a45fee 100644
--- a/sal/textenc/tcvtbyte.cxx
+++ b/sal/textenc/tcvtbyte.cxx
@@ -34,12 +34,12 @@
#include "tcvtbyte.hxx"
#include "tenchelp.hxx"
-sal_Size ImplSymbolToUnicode( const void*,
- void*,
+sal_Size ImplSymbolToUnicode( SAL_UNUSED_PARAMETER const void*,
+ SAL_UNUSED_PARAMETER void*,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
- sal_uInt32, sal_uInt32* pInfo,
- sal_Size* pSrcCvtBytes )
+ SAL_UNUSED_PARAMETER sal_uInt32,
+ sal_uInt32* pInfo, sal_Size* pSrcCvtBytes )
{
sal_uChar c;
sal_Unicode* pEndDestBuf;
@@ -70,8 +70,8 @@ sal_Size ImplSymbolToUnicode( const void*,
return (nDestChars - (pEndDestBuf-pDestBuf));
}
-sal_Size ImplUnicodeToSymbol( const void*,
- void*,
+sal_Size ImplUnicodeToSymbol( SAL_UNUSED_PARAMETER const void*,
+ SAL_UNUSED_PARAMETER void*,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
sal_uInt32 nFlags, sal_uInt32* pInfo,
@@ -130,10 +130,10 @@ sal_Size ImplUnicodeToSymbol( const void*,
}
sal_Size ImplUpperCharToUnicode( const void* pData,
- void*,
+ SAL_UNUSED_PARAMETER void*,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
- sal_uInt32, sal_uInt32* pInfo,
+ SAL_UNUSED_PARAMETER sal_uInt32, sal_uInt32* pInfo,
sal_Size* pSrcCvtBytes )
{
sal_uChar c;
diff --git a/sal/textenc/tcvtmb.cxx b/sal/textenc/tcvtmb.cxx
index 40bb909ce639..cea7cda42d9e 100644
--- a/sal/textenc/tcvtmb.cxx
+++ b/sal/textenc/tcvtmb.cxx
@@ -43,7 +43,7 @@
/* ======================================================================= */
-sal_Size ImplDBCSToUnicode( const void* pData, void*,
+sal_Size ImplDBCSToUnicode( const void* pData, SAL_UNUSED_PARAMETER void*,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
sal_uInt32 nFlags, sal_uInt32* pInfo,
@@ -223,7 +223,7 @@ sal_Size ImplDBCSToUnicode( const void* pData, void*,
/* ----------------------------------------------------------------------- */
-sal_Size ImplUnicodeToDBCS( const void* pData, void*,
+sal_Size ImplUnicodeToDBCS( const void* pData, SAL_UNUSED_PARAMETER void*,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
sal_uInt32 nFlags, sal_uInt32* pInfo,
@@ -386,7 +386,7 @@ sal_Size ImplUnicodeToDBCS( const void* pData, void*,
/* ----------------------------------------------------------------------- */
sal_Size ImplEUCJPToUnicode( const void* pData,
- void*,
+ SAL_UNUSED_PARAMETER void*,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
sal_uInt32 nFlags, sal_uInt32* pInfo,
@@ -549,7 +549,7 @@ sal_Size ImplEUCJPToUnicode( const void* pData,
/* ----------------------------------------------------------------------- */
sal_Size ImplUnicodeToEUCJP( const void* pData,
- void*,
+ SAL_UNUSED_PARAMETER void*,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
sal_uInt32 nFlags, sal_uInt32* pInfo,
diff --git a/sal/textenc/tcvtutf7.cxx b/sal/textenc/tcvtutf7.cxx
index 79dc5522d971..13c820e7ef55 100644
--- a/sal/textenc/tcvtutf7.cxx
+++ b/sal/textenc/tcvtutf7.cxx
@@ -143,7 +143,7 @@ void ImplUTF7ResetTextToUnicodeContext( void* pContext )
/* ----------------------------------------------------------------------- */
-sal_Size ImplUTF7ToUnicode( const void*, void* pContext,
+sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
const char* pSrcBuf, sal_Size nSrcBytes,
sal_Unicode* pDestBuf, sal_Size nDestChars,
sal_uInt32 nFlags, sal_uInt32* pInfo,
@@ -436,10 +436,10 @@ void ImplUTF7ResetUnicodeToTextContext( void* pContext )
/* ----------------------------------------------------------------------- */
-sal_Size ImplUnicodeToUTF7( const void*, void* pContext,
+sal_Size ImplUnicodeToUTF7( SAL_UNUSED_PARAMETER const void*, void* pContext,
const sal_Unicode* pSrcBuf, sal_Size nSrcChars,
char* pDestBuf, sal_Size nDestBytes,
- sal_uInt32, sal_uInt32* pInfo,
+ SAL_UNUSED_PARAMETER sal_uInt32, sal_uInt32* pInfo,
sal_Size* pSrcCvtChars )
{
ImplUTF7FromUCContextData* pContextData = (ImplUTF7FromUCContextData*)pContext;
diff --git a/sal/textenc/textcvt.cxx b/sal/textenc/textcvt.cxx
index e6f6470305fd..9f0c54763e34 100644
--- a/sal/textenc/textcvt.cxx
+++ b/sal/textenc/textcvt.cxx
@@ -122,7 +122,8 @@ rtl_TextToUnicodeConverter SAL_CALL rtl_createTextToUnicodeConverter( rtl_TextEn
/* ----------------------------------------------------------------------- */
-void SAL_CALL rtl_destroyTextToUnicodeConverter( rtl_TextToUnicodeConverter )
+void SAL_CALL rtl_destroyTextToUnicodeConverter(
+ SAL_UNUSED_PARAMETER rtl_TextToUnicodeConverter )
{}
/* ----------------------------------------------------------------------- */
@@ -199,7 +200,8 @@ rtl_UnicodeToTextConverter SAL_CALL rtl_createUnicodeToTextConverter( rtl_TextEn
/* ----------------------------------------------------------------------- */
-void SAL_CALL rtl_destroyUnicodeToTextConverter( rtl_UnicodeToTextConverter )
+void SAL_CALL rtl_destroyUnicodeToTextConverter(
+ SAL_UNUSED_PARAMETER rtl_UnicodeToTextConverter )
{}
/* ----------------------------------------------------------------------- */