summaryrefslogtreecommitdiff
path: root/sot/source/base
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 /sot/source/base
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 'sot/source/base')
-rw-r--r--sot/source/base/factory.cxx2
-rw-r--r--sot/source/base/filelist.cxx4
-rw-r--r--sot/source/base/formats.cxx8
-rw-r--r--sot/source/base/object.cxx8
4 files changed, 8 insertions, 14 deletions
diff --git a/sot/source/base/factory.cxx b/sot/source/base/factory.cxx
index 1a7e80805ad9..830c6beaaf10 100644
--- a/sot/source/base/factory.cxx
+++ b/sot/source/base/factory.cxx
@@ -202,7 +202,7 @@ void SotFactory::TestInvariant()
std::list<SotObject*>::iterator it;
for( it = pSotData->aObjectList.begin(); it != pSotData->aObjectList.end(); ++it )
- (*it)->TestInvariant( sal_False );
+ (*it)->TestInvariant();
#endif
}
diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx
index e29d3e6038bf..052657ee3a1a 100644
--- a/sot/source/base/filelist.cxx
+++ b/sot/source/base/filelist.cxx
@@ -110,9 +110,9 @@ void FileList::Assign( const SvDataCopyStream& rCopyStream )
* e.g. DropQueryFile
*/
-SvStream& operator<<( SvStream& rOStm, const FileList& /*rFileList*/ )
+SvStream& operator<<( SvStream& rOStm, SAL_UNUSED_PARAMETER const FileList& )
{
- OSL_FAIL("Not implemented!");
+ OSL_FAIL("TODO: Not implemented!");
return rOStm;
}
diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx
index 8f24951486e4..5f20b4108a89 100644
--- a/sot/source/base/formats.cxx
+++ b/sot/source/base/formats.cxx
@@ -1285,11 +1285,7 @@ sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, sal_u
// -----------------------------------------------------------------------------
-static sal_Bool CheckTransferableContext_Impl( const Reference< XTransferable >* pxTransferable, const SotAction_Impl&
-#ifdef WNT
-rEntry
-#endif
-)
+static sal_Bool CheckTransferableContext_Impl( const Reference< XTransferable >* pxTransferable, const SotAction_Impl& rEntry )
{
DataFlavor aFlavor;
sal_Bool bRet = sal_True;
@@ -1333,6 +1329,8 @@ rEntry
}
break;
}
+#else
+ (void) rEntry; // avoid warnings
#endif
}
}
diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx
index 73b24b7a8b37..ac8e1287a431 100644
--- a/sot/source/base/object.cxx
+++ b/sot/source/base/object.cxx
@@ -56,9 +56,7 @@ SO2_IMPL_INVARIANT(SotObject)
|*
|* Beschreibung:
*************************************************************************/
-void SotObject::TestMemberObjRef( sal_Bool /*bFree*/ )
-{
-}
+void SotObject::TestMemberObjRef() {}
/*************************************************************************
|* SotObject::TestMemberObjRef()
@@ -66,9 +64,7 @@ void SotObject::TestMemberObjRef( sal_Bool /*bFree*/ )
|* Beschreibung:
*************************************************************************/
#ifdef TEST_INVARIANT
-void SotObject::TestMemberInvariant( sal_Bool /*bPrint*/ )
-{
-}
+void SotObject::TestMemberInvariant() {}
#endif
/*************************************************************************