From 4250b25c6ae361359300ab6ccde27230f8e01039 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Jul 2017 14:49:15 +0200 Subject: teach unnecessaryparen loplugin about identifiers Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- sal/rtl/alloc_arena.cxx | 4 ++-- sal/rtl/alloc_cache.cxx | 8 ++++---- sal/rtl/random.cxx | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sal/rtl') diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx index 882652bc91e2..a0b16d57ec83 100644 --- a/sal/rtl/alloc_arena.cxx +++ b/sal/rtl/alloc_arena.cxx @@ -1147,9 +1147,9 @@ SAL_CALL rtl_machdep_alloc ( #endif #if defined(SAL_UNX) - addr = mmap (nullptr, (size_t)(size), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); + addr = mmap (nullptr, (size_t)size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); #elif defined(SAL_W32) - addr = VirtualAlloc (nullptr, (SIZE_T)(size), MEM_COMMIT, PAGE_READWRITE); + addr = VirtualAlloc (nullptr, (SIZE_T)size, MEM_COMMIT, PAGE_READWRITE); #endif /* (SAL_UNX || SAL_W32) */ if (addr != MAP_FAILED) diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx index f310559c81e8..d2c5fc5c8745 100644 --- a/sal/rtl/alloc_cache.cxx +++ b/sal/rtl/alloc_cache.cxx @@ -893,7 +893,7 @@ rtl_cache_activate ( QUEUE_INSERT_TAIL_NAMED(&(g_cache_list.m_cache_head), cache, cache_); RTL_MEMORY_LOCK_RELEASE(&(g_cache_list.m_lock)); } - return (cache); + return cache; } /** rtl_cache_deactivate() @@ -1165,7 +1165,7 @@ SAL_CALL rtl_cache_alloc ( cache->m_cpu_stats.m_alloc += 1; RTL_MEMORY_LOCK_RELEASE(&(cache->m_depot_lock)); - return (obj); + return obj; } prev = cache->m_cpu_prev; @@ -1205,7 +1205,7 @@ SAL_CALL rtl_cache_alloc ( obj = nullptr; } } - return (obj); + return obj; } /** rtl_cache_free() @@ -1326,7 +1326,7 @@ rtl_cache_wsupdate_wait (unsigned int seconds) timespec wakeup; gettimeofday(&now, nullptr); - wakeup.tv_sec = now.tv_sec + (seconds); + wakeup.tv_sec = now.tv_sec + seconds; wakeup.tv_nsec = now.tv_usec * 1000; (void) pthread_cond_timedwait ( diff --git a/sal/rtl/random.cxx b/sal/rtl/random.cxx index 3168c9686e28..360ade3b7873 100644 --- a/sal/rtl/random.cxx +++ b/sal/rtl/random.cxx @@ -101,7 +101,7 @@ static double data (RandomData_Impl *pImpl) ((double)(pImpl->m_nY) / 30269.0) + ((double)(pImpl->m_nZ) / 30307.0) ); - random -= ((double)((sal_uInt32)(random))); + random -= ((double)((sal_uInt32)random)); return random; } -- cgit