diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-01-21 15:21:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-01-21 15:21:16 +0100 |
commit | 7c704c78d3c652504c064b4ac7af55a2c1ee49bb (patch) | |
tree | 623358cf25839219ef4fd90eea4f3eaa55389a1f /sal/rtl | |
parent | 0d5167915b47df7c3e450614ea50d845ba959df3 (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 'sal/rtl')
-rw-r--r-- | sal/rtl/source/alloc_arena.cxx | 2 | ||||
-rw-r--r-- | sal/rtl/source/alloc_cache.cxx | 8 | ||||
-rw-r--r-- | sal/rtl/source/bootstrap.cxx | 2 | ||||
-rw-r--r-- | sal/rtl/source/cipher.cxx | 3 | ||||
-rw-r--r-- | sal/rtl/source/uuid.cxx | 3 |
5 files changed, 10 insertions, 8 deletions
diff --git a/sal/rtl/source/alloc_arena.cxx b/sal/rtl/source/alloc_arena.cxx index e10131076f8c..639608ce7b3d 100644 --- a/sal/rtl/source/alloc_arena.cxx +++ b/sal/rtl/source/alloc_arena.cxx @@ -911,7 +911,7 @@ SAL_CALL rtl_arena_create ( rtl_arena_type * source_arena, void * (SAL_CALL * source_alloc)(rtl_arena_type *, sal_Size *), void (SAL_CALL * source_free) (rtl_arena_type *, void *, sal_Size), - int + SAL_UNUSED_PARAMETER int ) SAL_THROW_EXTERN_C() { rtl_arena_type * result = 0; diff --git a/sal/rtl/source/alloc_cache.cxx b/sal/rtl/source/alloc_cache.cxx index d601bdb08fe9..102f772872f4 100644 --- a/sal/rtl/source/alloc_cache.cxx +++ b/sal/rtl/source/alloc_cache.cxx @@ -253,7 +253,7 @@ rtl_cache_hash_remove ( /** rtl_cache_slab_constructor() */ static int -rtl_cache_slab_constructor (void * obj, void *) +rtl_cache_slab_constructor (void * obj, SAL_UNUSED_PARAMETER void *) { rtl_cache_slab_type * slab = (rtl_cache_slab_type*)(obj); @@ -267,7 +267,7 @@ rtl_cache_slab_constructor (void * obj, void *) /** rtl_cache_slab_destructor() */ static void -rtl_cache_slab_destructor (void * obj, void *) +rtl_cache_slab_destructor (void * obj, SAL_UNUSED_PARAMETER void *) { rtl_cache_slab_type * slab = static_cast< rtl_cache_slab_type * >(obj); assert(QUEUE_STARTED_NAMED(slab, slab_)); // assure removed from queue(s) @@ -572,7 +572,7 @@ rtl_cache_slab_free ( /** rtl_cache_magazine_constructor() */ static int -rtl_cache_magazine_constructor (void * obj, void *) +rtl_cache_magazine_constructor (void * obj, SAL_UNUSED_PARAMETER void *) { rtl_cache_magazine_type * mag = (rtl_cache_magazine_type*)(obj); /* @@@ sal_Size size = (sal_Size)(arg); @@@ */ @@ -588,7 +588,7 @@ rtl_cache_magazine_constructor (void * obj, void *) /** rtl_cache_magazine_destructor() */ static void -rtl_cache_magazine_destructor (void * obj, void *) +rtl_cache_magazine_destructor (void * obj, SAL_UNUSED_PARAMETER void *) { rtl_cache_magazine_type * mag = static_cast< rtl_cache_magazine_type * >( obj); diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx index 4c3034c0655a..1fe2199e37de 100644 --- a/sal/rtl/source/bootstrap.cxx +++ b/sal/rtl/source/bootstrap.cxx @@ -581,7 +581,7 @@ rtlBootstrapHandle SAL_CALL rtl_bootstrap_args_open ( //---------------------------------------------------------------------------- void SAL_CALL rtl_bootstrap_args_close ( - rtlBootstrapHandle + SAL_UNUSED_PARAMETER rtlBootstrapHandle ) SAL_THROW_EXTERN_C() { // do nothing; the BootstrapMap::map_ just keeps growing for now diff --git a/sal/rtl/source/cipher.cxx b/sal/rtl/source/cipher.cxx index 31c141771724..4dc517193fdd 100644 --- a/sal/rtl/source/cipher.cxx +++ b/sal/rtl/source/cipher.cxx @@ -1282,7 +1282,8 @@ rtlCipherError SAL_CALL rtl_cipher_initARCFOUR ( rtlCipher Cipher, rtlCipherDirection Direction, const sal_uInt8 *pKeyData, sal_Size nKeyLen, - const sal_uInt8 *, sal_Size) SAL_THROW_EXTERN_C() + SAL_UNUSED_PARAMETER const sal_uInt8 *, SAL_UNUSED_PARAMETER sal_Size) + SAL_THROW_EXTERN_C() { CipherARCFOUR_Impl *pImpl = (CipherARCFOUR_Impl*)Cipher; diff --git a/sal/rtl/source/uuid.cxx b/sal/rtl/source/uuid.cxx index 340bbe9bdf41..bb5c7276282e 100644 --- a/sal/rtl/source/uuid.cxx +++ b/sal/rtl/source/uuid.cxx @@ -100,7 +100,8 @@ static void write_v3( sal_uInt8 *pUuid ) extern "C" void SAL_CALL rtl_createUuid( sal_uInt8 *pTargetUUID , - const sal_uInt8 *, sal_Bool ) + SAL_UNUSED_PARAMETER const sal_uInt8 *, + SAL_UNUSED_PARAMETER sal_Bool ) { { osl::MutexGuard g(osl::Mutex::getGlobalMutex()); |