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>
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 6d8aba8..d9d6710 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 43f04ba..f49076e 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);
}