From a7acea766c7812614b95257e934648cdf737ca3f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 25 May 2018 15:56:15 +0200 Subject: loplugin:unusedmethods Change-Id: I64df1f467986b3d70c058adff289a6dd8f00fb20 Reviewed-on: https://gerrit.libreoffice.org/54821 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sal/rtl/alloc_arena.hxx | 1 - sal/rtl/alloc_cache.cxx | 18 ------------------ 2 files changed, 19 deletions(-) (limited to 'sal') diff --git a/sal/rtl/alloc_arena.hxx b/sal/rtl/alloc_arena.hxx index 120d0ec5ac45..8bc419e33090 100644 --- a/sal/rtl/alloc_arena.hxx +++ b/sal/rtl/alloc_arena.hxx @@ -114,7 +114,6 @@ extern rtl_arena_type * gp_default_arena; typedef void (*ArenaForeachFn)(void *addr, sal_Size size); void rtl_arena_foreach(rtl_arena_type *arena, ArenaForeachFn fn); -void rtl_cache_foreach(rtl_cache_type *arena, ArenaForeachFn foreachFn); #endif // INCLUDED_SAL_RTL_ALLOC_ARENA_HXX diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx index f7dd02ab7c8a..38449ccfb795 100644 --- a/sal/rtl/alloc_cache.cxx +++ b/sal/rtl/alloc_cache.cxx @@ -1141,24 +1141,6 @@ void SAL_CALL rtl_cache_free( } } -// FIXME: foreachFn called for free'd blocks and will break free-chains. -void rtl_cache_foreach(rtl_cache_type *cache, ArenaForeachFn foreachFn) -{ - for (rtl_cache_slab_type *cur = &(cache->m_used_head); - cur && cur->m_slab_next != &(cache->m_used_head); - cur = cur->m_slab_next) - { - for (char *item = reinterpret_cast(cur->m_data); - item < reinterpret_cast(cur->m_bp); - item += cache->m_type_size) - { - foreachFn(item, cache->m_type_size); - } - } - - RTL_MEMORY_LOCK_RELEASE(&(cache->m_slab_lock)); -} - #if defined(SAL_UNX) void SAL_CALL rtl_secureZeroMemory(void *Ptr, sal_Size Bytes) SAL_THROW_EXTERN_C() -- cgit