WaE: C6011 Dereferencing NULL pointer warnings

Change-Id: I6eb8e490e878349f2063910e0cbc901aa7a6d524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166942
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Caolán McNamara 2024-04-30 20:41:27 +01:00
parent fdbc8d1374
commit ed3ce7bfeb
4 changed files with 7 additions and 8 deletions

View file

@ -146,7 +146,7 @@ static OptionInfo const * get_option_info(
static bool is_option(
OptionInfo const * option_info, sal_uInt32 * pIndex )
{
OSL_ASSERT( option_info != 0 );
assert(option_info != 0);
if (osl_getCommandArgCount() <= *pIndex)
return false;

View file

@ -709,7 +709,9 @@ void HelpLinker::main( std::vector<std::string> &args,
}
}
else
{ //called from extension manager
{
assert(pExtensionPath);
//called from extension manager
extensionPath = *pExtensionPath;
sourceRoot = fs::path(extensionPath);
extensionDestination = *pDestination;

View file

@ -99,9 +99,9 @@ bool SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase,
size_t SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) const
{
SvMetaType * pType = GetType();
DBG_ASSERT( pType, "no type for attribute" );
assert(pType && "no type for attribute");
SvMetaType * pBaseType = pType->GetBaseType();
DBG_ASSERT( pBaseType, "no base type for attribute" );
assert(pBaseType && "no base type for attribute");
if( pBaseType->GetMetaTypeType() == MetaTypeType::Struct )
return pBaseType->MakeSfx( rAttrArray );
else

View file

@ -319,19 +319,16 @@ StorageElementFactory::createStream( const OUString & rUri,
new Stream( m_xContext, m_xDocsMgr, rUri, xParentStorage, xStream ) );
}
void StorageElementFactory::releaseElement( Storage const * pElement )
{
OSL_ASSERT( pElement );
assert(pElement);
osl::MutexGuard aGuard( m_aMutex );
if ( pElement->m_aContainerIt != m_aMap.end() )
m_aMap.erase( pElement->m_aContainerIt );
}
// Non-UNO interface
uno::Reference< embed::XStorage > StorageElementFactory::queryParentStorage(
const OUString & rUri, StorageAccessMode eMode )
{