sal/osl/unx/file.cxx | 1 - sal/osl/w32/file.cxx | 3 --- 2 files changed, 4 deletions(-)
New commits: commit 7b4f4f15971047664fa278fff96b959d53b272b3 Author: Chris Sherlock <chris.sherloc...@gmail.com> Date: Wed Jul 5 11:51:08 2017 +1000 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 <c...@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherloc...@gmail.com> 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); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits