[Libreoffice-commits] core.git: sal/rtl

Stephan Bergmann sbergman at redhat.com
Tue Jan 2 07:22:49 UTC 2018


 sal/rtl/alloc_cache.cxx |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

New commits:
commit 733a8cc0909b33661d0736e5b8af5d46b2097acd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jan 1 21:52:07 2018 +0100

    Unused return value of rtl_cache_constructor
    
    Change-Id: I1e8b8ae65d9989683dde8f642f3c19355d10a571
    Reviewed-on: https://gerrit.libreoffice.org/47238
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx
index 5ad8690e3152..1c24faaf9829 100644
--- a/sal/rtl/alloc_cache.cxx
+++ b/sal/rtl/alloc_cache.cxx
@@ -642,7 +642,7 @@ bool rtl_cache_depot_populate(rtl_cache_type * cache)
     return (empty != nullptr);
 }
 
-int rtl_cache_constructor(void * obj)
+void rtl_cache_constructor(void * obj)
 {
     rtl_cache_type * cache = static_cast<rtl_cache_type*>(obj);
 
@@ -663,8 +663,6 @@ int rtl_cache_constructor(void * obj)
 
     /* depot layer */
     RTL_MEMORY_LOCK_INIT(&(cache->m_depot_lock));
-
-    return 1;
 }
 
 void rtl_cache_destructor(void * obj)
@@ -945,7 +943,7 @@ try_alloc:
     if (result)
     {
         rtl_cache_type * cache = result;
-        (void) rtl_cache_constructor (cache);
+        rtl_cache_constructor (cache);
 
         if (!source)
         {
@@ -1368,7 +1366,7 @@ void rtl_cache_init()
     {
         /* list of caches */
         RTL_MEMORY_LOCK_INIT(&(g_cache_list.m_lock));
-        (void) rtl_cache_constructor (&(g_cache_list.m_cache_head));
+        rtl_cache_constructor (&(g_cache_list.m_cache_head));
     }
     {
         /* cache: internal arena */
@@ -1393,7 +1391,7 @@ void rtl_cache_init()
         static rtl_cache_type g_cache_magazine_cache;
 
         assert(!gp_cache_magazine_cache);
-        (void) rtl_cache_constructor (&g_cache_magazine_cache);
+        rtl_cache_constructor (&g_cache_magazine_cache);
 
         gp_cache_magazine_cache = rtl_cache_activate (
             &g_cache_magazine_cache,
@@ -1416,7 +1414,7 @@ void rtl_cache_init()
         static rtl_cache_type g_cache_slab_cache;
 
         assert(!gp_cache_slab_cache);
-        (void) rtl_cache_constructor (&g_cache_slab_cache);
+        rtl_cache_constructor (&g_cache_slab_cache);
 
         gp_cache_slab_cache = rtl_cache_activate (
             &g_cache_slab_cache,
@@ -1436,7 +1434,7 @@ void rtl_cache_init()
         static rtl_cache_type g_cache_bufctl_cache;
 
         assert(!gp_cache_bufctl_cache);
-        (void) rtl_cache_constructor (&g_cache_bufctl_cache);
+        rtl_cache_constructor (&g_cache_bufctl_cache);
 
         gp_cache_bufctl_cache = rtl_cache_activate (
             &g_cache_bufctl_cache,


More information about the Libreoffice-commits mailing list