summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx1
-rw-r--r--canvas/source/directx/dx_canvasbitmap.cxx1
-rw-r--r--extensions/source/scanner/twain32shim.cxx1
-rw-r--r--include/basegfx/raster/rasterconvert3d.hxx3
-rw-r--r--registry/source/regkey.cxx2
-rw-r--r--stoc/source/corereflection/criface.cxx1
-rw-r--r--stoc/source/proxy_factory/proxyfac.cxx8
7 files changed, 11 insertions, 6 deletions
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index e5836dd11d98..7dd6df9cb6ce 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -410,6 +410,7 @@ RaiseInfo::RaiseInfo(typelib_TypeDescription* pTD) noexcept
// 32 bit offsets
const int totalSize = codeSize + typeInfoArraySize + excTypeAddLen;
unsigned char* pCode = _code = static_cast<unsigned char*>(std::malloc(totalSize));
+ assert(pCode && "Don't handle OOM conditions");
int pCodeOffset = 0;
// New base of types array, starts after Trampoline D-Tor / C-Tors
diff --git a/canvas/source/directx/dx_canvasbitmap.cxx b/canvas/source/directx/dx_canvasbitmap.cxx
index fb06288ada86..cfef86a536ec 100644
--- a/canvas/source/directx/dx_canvasbitmap.cxx
+++ b/canvas/source/directx/dx_canvasbitmap.cxx
@@ -208,6 +208,7 @@ namespace dxcanvas
const sal_Int32 nScanWidth((aSize.getWidth() + 3) & ~3);
std::unique_ptr<sal_uInt8[]> pAlphaBits( new sal_uInt8[nScanWidth*aSize.getHeight()] );
const sal_uInt8* pInBits=static_cast<sal_uInt8*>(aBmpData.Scan0);
+ assert(pInBits);
pInBits+=3;
for( sal_Int32 y=0; y<aSize.getHeight(); ++y )
{
diff --git a/extensions/source/scanner/twain32shim.cxx b/extensions/source/scanner/twain32shim.cxx
index 6e0be8149471..5827a946fedb 100644
--- a/extensions/source/scanner/twain32shim.cxx
+++ b/extensions/source/scanner/twain32shim.cxx
@@ -287,6 +287,7 @@ void ImpTwain::ImplOpenSource()
TW_CAPABILITY aCap
= { CAP_XFERCOUNT, TWON_ONEVALUE, GlobalAlloc(GHND, sizeof(TW_ONEVALUE)) };
TW_ONEVALUE* pVal = static_cast<TW_ONEVALUE*>(GlobalLock(aCap.hContainer));
+ assert(pVal);
pVal->ItemType = TWTY_INT16;
pVal->Item = 1;
diff --git a/include/basegfx/raster/rasterconvert3d.hxx b/include/basegfx/raster/rasterconvert3d.hxx
index 83f753e3184b..25cf2a333f06 100644
--- a/include/basegfx/raster/rasterconvert3d.hxx
+++ b/include/basegfx/raster/rasterconvert3d.hxx
@@ -21,6 +21,7 @@
#include <config_options.h>
#include <sal/types.h>
+#include <cassert>
#include <vector>
#include <osl/diagnose.h>
@@ -395,7 +396,7 @@ namespace basegfx
{
bool operator()(const RasterConversionLineEntry3D* pA, const RasterConversionLineEntry3D* pB)
{
- OSL_ENSURE(pA && pB, "lineComparator: empty pointer (!)");
+ assert(pA && pB && "lineComparator: empty pointer (!)");
return pA->getX().getVal() < pB->getX().getVal();
}
};
diff --git a/registry/source/regkey.cxx b/registry/source/regkey.cxx
index b2eeb63e67a6..c9fc096eaf48 100644
--- a/registry/source/regkey.cxx
+++ b/registry/source/regkey.cxx
@@ -439,7 +439,7 @@ RegError REGISTRY_CALLTYPE getStringListValue(RegKeyHandle hKey,
char*** pValueList,
sal_uInt32* pLen)
{
- OSL_PRECOND((pValueList != nullptr) && (pLen != nullptr), "registry::getStringListValue(): invalid parameter");
+ assert(pValueList != nullptr && pLen != nullptr && "registry::getStringListValue(): invalid parameter");
*pValueList = nullptr;
*pLen = 0;
diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx
index 23d3d9bae278..130ff546e278 100644
--- a/stoc/source/corereflection/criface.cxx
+++ b/stoc/source/corereflection/criface.cxx
@@ -508,6 +508,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > &
ppParamTypes[nPos] = nullptr;
TYPELIB_DANGER_GET( ppParamTypes + nPos, pParams[nPos].pTypeRef );
typelib_TypeDescription * pTD = ppParamTypes[nPos];
+ assert(pTD);
ppUnoArgs[nPos] = alloca( pTD->nSize );
if (pParams[nPos].bIn)
diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx
index 6745d0163c70..a22bcc3fcafe 100644
--- a/stoc/source/proxy_factory/proxyfac.cxx
+++ b/stoc/source/proxy_factory/proxyfac.cxx
@@ -181,7 +181,7 @@ static void binuno_proxy_acquire( uno_Interface * pUnoI )
// rebirth of zombie
uno_ExtEnvironment * uno_env =
that->m_root->m_factory->m_uno_env.get()->pExtEnv;
- OSL_ASSERT( uno_env != nullptr );
+ assert(uno_env != nullptr);
(*uno_env->registerProxyInterface)(
uno_env, reinterpret_cast< void ** >( &pUnoI ), binuno_proxy_free,
that->m_oid.pData,
@@ -198,7 +198,7 @@ static void binuno_proxy_release( uno_Interface * pUnoI )
{
uno_ExtEnvironment * uno_env =
that->m_root->m_factory->m_uno_env.get()->pExtEnv;
- OSL_ASSERT( uno_env != nullptr );
+ assert(uno_env != nullptr);
(*uno_env->revokeInterface)( uno_env, pUnoI );
}
}
@@ -289,7 +289,7 @@ Any ProxyRoot::queryAggregation( Type const & rType )
{
Reference< XInterface > xProxy;
uno_ExtEnvironment * cpp_env = m_factory->m_cpp_env.get()->pExtEnv;
- OSL_ASSERT( cpp_env != nullptr );
+ assert(cpp_env != nullptr);
// mind a new delegator, calculate current root:
Reference< XInterface > xRoot(
@@ -323,7 +323,7 @@ Any ProxyRoot::queryAggregation( Type const & rType )
SAL_NO_ACQUIRE );
uno_ExtEnvironment * uno_env =
m_factory->m_uno_env.get()->pExtEnv;
- OSL_ASSERT( uno_env != nullptr );
+ assert(uno_env != nullptr);
(*uno_env->registerProxyInterface)(
uno_env, reinterpret_cast< void ** >( &proxy.m_pUnoI ),
binuno_proxy_free, oid.pData,