summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-07-05 11:51:08 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-07-08 02:32:05 +0200
commit7b4f4f15971047664fa278fff96b959d53b272b3 (patch)
tree55026d0d29cfafe801e265ec5d449d31c30bd4cd /sal
parent3329d2205ed3246c56da1bd859acaaf590dd6e71 (diff)
osl: followup to 7c6ccc42 for w32/unx file.cxx
As pointed out by sberg, either the issue is a programming error that needs an assert, or the issue is unusual and should just generated a warning, but never both. Change-Id: I07ae1e99597cd6c342791aa268b2240db987ae91 Reviewed-on: https://gerrit.libreoffice.org/39514 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file.cxx1
-rw-r--r--sal/osl/w32/file.cxx3
2 files changed, 0 insertions, 4 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 6d8aba858d95..d9d6710388db 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -201,7 +201,6 @@ 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");
- assert(ppBuffer && pnSize);
if ((ppBuffer) && (pnSize))
{
*ppBuffer = static_cast< sal_uInt8* >(rtl_cache_alloc(m_cache));
diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index 43f04ba92310..f49076ed4970 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -181,7 +181,6 @@ 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");
- assert((ppBuffer) && (pnSize));
*ppBuffer = static_cast< sal_uInt8* >(rtl_cache_alloc(m_cache));
*pnSize = m_bufsiz;
@@ -197,14 +196,12 @@ FileHandle_Impl::Guard::Guard(LPCRITICAL_SECTION pMutex)
: m_mutex (pMutex)
{
SAL_WARN_IF(!(m_mutex), "sal.osl", "FileHandle_Impl::Guard::Guard(): null pointer.");
- assert(m_mutex);
::EnterCriticalSection (m_mutex);
}
FileHandle_Impl::Guard::~Guard()
{
SAL_WARN_IF(!(m_mutex), "sal.osl", "FileHandle_Impl::Guard::~Guard(): null pointer.");
- assert(m_mutex);
::LeaveCriticalSection (m_mutex);
}