summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-06 14:49:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 09:57:24 +0200
commit4250b25c6ae361359300ab6ccde27230f8e01039 (patch)
tree916a8420282928a92ede0760d696997550ae0840 /sal
parent2ed9a2b641682d8612b5404bd3978ed049aa0266 (diff)
teach unnecessaryparen loplugin about identifiers
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx4
-rw-r--r--sal/rtl/alloc_arena.cxx4
-rw-r--r--sal/rtl/alloc_cache.cxx8
-rw-r--r--sal/rtl/random.cxx2
-rw-r--r--sal/textenc/tcvtutf7.cxx2
5 files changed, 10 insertions, 10 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index d9d6710388db..41584c22f7dc 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -201,7 +201,7 @@ FileHandle_Impl::Allocator::~Allocator()
void FileHandle_Impl::Allocator::allocate(sal_uInt8 **ppBuffer, size_t *pnSize)
{
SAL_WARN_IF((!ppBuffer) || (!pnSize), "sal.osl", "FileHandle_Impl::Allocator::allocate(): contract violation");
- if ((ppBuffer) && (pnSize))
+ if (ppBuffer && pnSize)
{
*ppBuffer = static_cast< sal_uInt8* >(rtl_cache_alloc(m_cache));
*pnSize = m_bufsiz;
@@ -322,7 +322,7 @@ oslFileError FileHandle_Impl::setSize(sal_uInt64 uSize)
if (write(m_fd, "", (size_t)1) == -1)
{
/* Failure. Restore saved position */
- (void) lseek(m_fd, (off_t)(nCurPos), SEEK_SET);
+ (void) lseek(m_fd, (off_t)nCurPos, SEEK_SET);
return result;
}
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;
}
diff --git a/sal/textenc/tcvtutf7.cxx b/sal/textenc/tcvtutf7.cxx
index f9cae77633da..ab798d8b1ecb 100644
--- a/sal/textenc/tcvtutf7.cxx
+++ b/sal/textenc/tcvtutf7.cxx
@@ -275,7 +275,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
while ( (pDestBuf < pEndDestBuf) && (nBufferBits >= 16) )
{
nBitBufferTemp = nBitBuffer >> (32-16);
- *pDestBuf = (sal_Unicode)((nBitBufferTemp) & 0xFFFF);
+ *pDestBuf = (sal_Unicode)(nBitBufferTemp & 0xFFFF);
pDestBuf++;
nBitBuffer <<= 16;
nBufferBits -= 16;