summaryrefslogtreecommitdiff
path: root/vcl/unx/generic
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-06-12 20:11:20 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-17 06:38:57 +0000
commit9c79945ca62b18213728cdd23d9f390304aee1de (patch)
tree94bb9cc30cbb5bb5508875d80fcf975b673fe0ac /vcl/unx/generic
parent29e91d5eedd2bf20504ce9ada625d33fec19dc9e (diff)
convert DBG_ASSERT in vcl
Change-Id: I732fb1a789f90ca7a7f393cc41a6afe84fecf3d3 Reviewed-on: https://gerrit.libreoffice.org/26200 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r--vcl/unx/generic/app/saldata.cxx6
-rw-r--r--vcl/unx/generic/app/saldisp.cxx50
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx6
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.cxx4
-rw-r--r--vcl/unx/generic/gdi/salbmp.cxx2
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx2
-rw-r--r--vcl/unx/generic/glyphs/freetype_glyphcache.cxx12
-rw-r--r--vcl/unx/generic/glyphs/glyphcache.cxx4
-rw-r--r--vcl/unx/generic/print/genpspgraphics.cxx2
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx4
-rw-r--r--vcl/unx/generic/window/salframe.cxx4
-rw-r--r--vcl/unx/generic/window/salobj.cxx2
12 files changed, 49 insertions, 49 deletions
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index d33af9dbb883..d6673b881fc5 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -588,8 +588,8 @@ void SalXLib::Insert( int nFD, void* data,
YieldFunc queued,
YieldFunc handle )
{
- DBG_ASSERT( nFD, "can not insert stdin descriptor" );
- DBG_ASSERT( !yieldTable[nFD].fd, "SalXLib::Insert fd twice" );
+ SAL_WARN_IF( !nFD, "vcl", "can not insert stdin descriptor" );
+ SAL_WARN_IF( yieldTable[nFD].fd, "vcl", "SalXLib::Insert fd twice" );
yieldTable[nFD].fd = nFD;
yieldTable[nFD].data = data;
@@ -679,7 +679,7 @@ SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
YieldEntry* pEntry = &(yieldTable[nFD]);
if ( pEntry->fd )
{
- DBG_ASSERT( nFD == pEntry->fd, "wrong fd in Yield()" );
+ SAL_WARN_IF( nFD != pEntry->fd, "vcl", "wrong fd in Yield()" );
for( int i = 0; i < nMaxEvents && pEntry->HasPendingEvent(); i++ )
{
pEntry->HandleNextEvent();
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index c715ce0a7f71..635530380790 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -153,7 +153,7 @@ static bool sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI )
rVI = *pInfo;
XFree( pInfo );
- DBG_ASSERT( rVI.visualid == nVID,
+ SAL_WARN_IF( rVI.visualid != nVID, "vcl",
"sal_GetVisualInfo: could not get correct visual by visualId" );
return true;
}
@@ -308,7 +308,7 @@ SalDisplay::SalDisplay( Display *display ) :
#endif
SalGenericData *pData = GetGenericData();
- DBG_ASSERT( ! pData->GetDisplay(), "Second SalDisplay created !!!\n" );
+ SAL_WARN_IF( pData->GetDisplay(), "vcl", "Second SalDisplay created !!!\n" );
pData->SetDisplay( this );
m_nXDefaultScreen = SalX11Screen( DefaultScreen( pDisp_ ) );
@@ -385,7 +385,7 @@ void SalDisplay::doDestruct()
static int DisplayHasEvent( int fd, SalX11Display *pDisplay )
{
(void)fd;
- DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd,
+ SAL_WARN_IF( ConnectionNumber( pDisplay->GetDisplay() ) != fd, "vcl",
"wrong fd in DisplayHasEvent" );
if( ! pDisplay->IsDisplay() )
return 0;
@@ -400,7 +400,7 @@ static int DisplayHasEvent( int fd, SalX11Display *pDisplay )
static int DisplayQueue( int fd, SalX11Display *pDisplay )
{
(void)fd;
- DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd,
+ SAL_WARN_IF( ConnectionNumber( pDisplay->GetDisplay() ) != fd, "vcl",
"wrong fd in DisplayHasEvent" );
int result;
@@ -414,7 +414,7 @@ static int DisplayQueue( int fd, SalX11Display *pDisplay )
static int DisplayYield( int fd, SalX11Display *pDisplay )
{
(void)fd;
- DBG_ASSERT( ConnectionNumber( pDisplay->GetDisplay() ) == fd,
+ SAL_WARN_IF( ConnectionNumber( pDisplay->GetDisplay() ) != fd, "vcl",
"wrong fd in DisplayHasEvent" );
GetSalData()->m_pInstance->GetYieldMutex()->acquire();
@@ -1533,54 +1533,54 @@ Cursor SalDisplay::GetPointer( PointerStyle ePointerStyle )
break;
case PointerStyle::Arrow:
aCur = XCreateFontCursor( pDisp_, XC_left_ptr );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::Wait:
aCur = XCreateFontCursor( pDisp_, XC_watch );
break;
case PointerStyle::Text: // Mouse Pointer is a "I" Beam
aCur = XCreateFontCursor( pDisp_, XC_xterm );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::Help:
aCur = XCreateFontCursor( pDisp_, XC_question_arrow );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::Cross: // Mouse Pointer is a cross
aCur = XCreateFontCursor( pDisp_, XC_crosshair );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::NSize:
aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::SSize:
aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::WSize:
aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::ESize:
aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::WindowNSize:
aCur = XCreateFontCursor( pDisp_, XC_top_side );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::WindowSSize:
aCur = XCreateFontCursor( pDisp_, XC_bottom_side );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::WindowWSize:
aCur = XCreateFontCursor( pDisp_, XC_left_side );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::WindowESize:
aCur = XCreateFontCursor( pDisp_, XC_right_side );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::NWSize:
aCur = XCreateFontCursor( pDisp_, XC_top_left_corner );
@@ -1596,19 +1596,19 @@ Cursor SalDisplay::GetPointer( PointerStyle ePointerStyle )
break;
case PointerStyle::WindowNWSize:
aCur = XCreateFontCursor( pDisp_, XC_top_left_corner );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::WindowNESize:
aCur = XCreateFontCursor( pDisp_, XC_top_right_corner );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::WindowSWSize:
aCur = XCreateFontCursor( pDisp_, XC_bottom_left_corner );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::WindowSESize:
aCur = XCreateFontCursor( pDisp_, XC_bottom_right_corner );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::HSplit:
aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow );
@@ -1618,15 +1618,15 @@ Cursor SalDisplay::GetPointer( PointerStyle ePointerStyle )
break;
case PointerStyle::HSizeBar:
aCur = XCreateFontCursor( pDisp_, XC_sb_h_double_arrow ); // ???
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::VSizeBar:
aCur = XCreateFontCursor( pDisp_, XC_sb_v_double_arrow ); // ???
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::RefHand:
aCur = XCreateFontCursor( pDisp_, XC_hand1 );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::Hand:
aCur = XCreateFontCursor( pDisp_, XC_hand2 );
@@ -1723,7 +1723,7 @@ Cursor SalDisplay::GetPointer( PointerStyle ePointerStyle )
break;
case PointerStyle::Pen: // Mouse Pointer is a pencil
aCur = XCreateFontCursor( pDisp_, XC_pencil );
- DBG_ASSERT( aCur != None, "GetPointer: Could not define cursor" );
+ SAL_WARN_IF( aCur == None, "vcl", "GetPointer: Could not define cursor" );
break;
case PointerStyle::LinkData:
MAKE_CURSOR( linkdata_ );
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 68b21b40f90e..e7e59aa80b41 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -1957,9 +1957,9 @@ bool PrintFontManager::createFontSubset(
}
else
{
- DBG_ASSERT( !(pGlyphIds[i] & 0x007f0000), "overlong glyph id" );
- DBG_ASSERT( (int)pNewEncoding[i] < nGlyphs, "encoding wrong" );
- DBG_ASSERT( pEnc[pNewEncoding[i]] == 0 && pGID[pNewEncoding[i]] == 0, "duplicate encoded glyph" );
+ SAL_WARN_IF( (pGlyphIds[i] & 0x007f0000), "vcl", "overlong glyph id" );
+ SAL_WARN_IF( (int)pNewEncoding[i] >= nGlyphs, "vcl", "encoding wrong" );
+ SAL_WARN_IF( pEnc[pNewEncoding[i]] != 0 || pGID[pNewEncoding[i]] != 0, "vcl", "duplicate encoded glyph" );
pEnc[ pNewEncoding[i] ] = pNewEncoding[i];
pGID[ pNewEncoding[i] ] = (sal_uInt16)pGlyphIds[ i ];
pOldIndex[ pNewEncoding[i] ] = i;
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index 6590b11f3064..0a073495969a 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -425,7 +425,7 @@ GC X11SalGraphicsImpl::SelectBrush()
{
Display *pDisplay = mrParent.GetXDisplay();
- DBG_ASSERT( mnBrushColor != SALCOLOR_NONE, "Brush Transparent" );
+ SAL_WARN_IF( mnBrushColor == SALCOLOR_NONE, "vcl", "Brush Transparent" );
if( !mpBrushGC )
{
@@ -670,7 +670,7 @@ void X11SalGraphicsImpl::drawBitmap( const SalTwoRect& rPosAry,
const SalBitmap& rSrcBitmap,
const SalBitmap& rMaskBitmap )
{
- DBG_ASSERT( !mrParent.bPrinter_, "Drawing of transparent bitmaps on printer devices is strictly forbidden" );
+ SAL_WARN_IF( mrParent.bPrinter_, "vcl", "Drawing of transparent bitmaps on printer devices is strictly forbidden" );
// decide if alpha masking or transparency masking is needed
BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rMaskBitmap).AcquireBuffer( BitmapAccessMode::Read );
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index e3c18fe16d27..95665fd3b03f 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -83,7 +83,7 @@ void X11SalBitmap::ImplCreateCache()
void X11SalBitmap::ImplDestroyCache()
{
- DBG_ASSERT( mnCacheInstCount, "X11SalBitmap::ImplDestroyCache(): underflow" );
+ SAL_WARN_IF( !mnCacheInstCount, "vcl", "X11SalBitmap::ImplDestroyCache(): underflow" );
if( mnCacheInstCount && !--mnCacheInstCount )
{
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 896f6cf0ce44..a8106a6c28a1 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -111,7 +111,7 @@ void X11SalGraphics::freeResources()
{
Display *pDisplay = GetXDisplay();
- DBG_ASSERT( !pPaintRegion_, "pPaintRegion_" );
+ SAL_WARN_IF( pPaintRegion_, "vcl", "pPaintRegion_" );
if( mpClipRegion )
{
XDestroyRegion( mpClipRegion );
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 3db03a22ac27..7023a5f1b9ea 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -1120,7 +1120,7 @@ PolyArgs::~PolyArgs()
void PolyArgs::AddPoint( long nX, long nY, PolyFlags aFlag )
{
- DBG_ASSERT( (mnPoints < mnMaxPoints), "FTGlyphOutline: AddPoint overflow!" );
+ SAL_WARN_IF( (mnPoints >= mnMaxPoints), "vcl", "FTGlyphOutline: AddPoint overflow!" );
if( mnPoints >= mnMaxPoints )
return;
@@ -1138,11 +1138,11 @@ void PolyArgs::ClosePolygon()
// freetype seems to always close the polygon with an ON_CURVE point
// PolyPoly wants to close the polygon itself => remove last point
- DBG_ASSERT( (mnPoints >= 2), "FTGlyphOutline: PolyFinishNum failed!" );
+ SAL_WARN_IF( (mnPoints < 2), "vcl", "FTGlyphOutline: PolyFinishNum failed!" );
--mnPoints;
- DBG_ASSERT( (mpPointAry[0]==mpPointAry[mnPoints]), "FTGlyphOutline: PolyFinishEq failed!" );
- DBG_ASSERT( (mpFlagAry[0]==POLY_NORMAL), "FTGlyphOutline: PolyFinishFE failed!" );
- DBG_ASSERT( (mpFlagAry[mnPoints]==POLY_NORMAL), "FTGlyphOutline: PolyFinishFS failed!" );
+ SAL_WARN_IF( (mpPointAry[0]!=mpPointAry[mnPoints]), "vcl", "FTGlyphOutline: PolyFinishEq failed!" );
+ SAL_WARN_IF( (mpFlagAry[0]!=POLY_NORMAL), "vcl", "FTGlyphOutline: PolyFinishFE failed!" );
+ SAL_WARN_IF( (mpFlagAry[mnPoints]!=POLY_NORMAL), "vcl", "FTGlyphOutline: PolyFinishFS failed!" );
tools::Polygon aPoly( mnPoints, mpPointAry, (bHasOffline ? mpFlagAry : nullptr) );
@@ -1521,7 +1521,7 @@ void ServerFont::ApplyGSUB( const FontSelectPattern& rFSD )
break;
}
- DBG_ASSERT( (it == aSubstVector.end()), "lookup<->coverage table mismatch" );
+ SAL_WARN_IF( (it != aSubstVector.end()), "vcl", "lookup<->coverage table mismatch" );
// now apply the glyph substitutions that have been collected in this subtable
for( it = aSubstVector.begin(); it != aSubstVector.end(); ++it )
maGlyphSubstitution[ (*it).first ] = (*it).second;
diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx
index f83eb879b43d..22ee588d260c 100644
--- a/vcl/unx/generic/glyphs/glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/glyphcache.cxx
@@ -252,7 +252,7 @@ void GlyphCache::GarbageCollect()
}
else // current GC font is unreferenced
{
- DBG_ASSERT( (pServerFont->GetRefCount() == 0),
+ SAL_WARN_IF( (pServerFont->GetRefCount() != 0), "vcl",
"GlyphCache::GC detected RefCount underflow" );
// free all pServerFont related data
@@ -313,7 +313,7 @@ void ServerFont::ReleaseFromGarbageCollect()
long ServerFont::Release() const
{
- DBG_ASSERT( mnRefCount > 0, "ServerFont: RefCount underflow" );
+ SAL_WARN_IF( mnRefCount <= 0, "vcl", "ServerFont: RefCount underflow" );
return --mnRefCount;
}
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index 0d92c3bc7cc8..51dfdc863c79 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -390,7 +390,7 @@ void GenPspGraphics::SetROPFillColor( SalROPColor )
void GenPspGraphics::SetXORMode( bool bSet )
{
(void)bSet;
- DBG_ASSERT( !bSet, "Error: PrinterGfx::SetXORMode() not implemented" );
+ SAL_WARN_IF( bSet, "vcl", "Error: PrinterGfx::SetXORMode() not implemented" );
}
void GenPspGraphics::drawPixel( long nX, long nY )
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index f28e8b077bc4..be9149c09dc5 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -546,7 +546,7 @@ const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& rPrinter
static PrinterInfo aEmptyInfo;
std::unordered_map< OUString, Printer, OUStringHash >::const_iterator it = m_aPrinters.find( rPrinter );
- DBG_ASSERT( it != m_aPrinters.end(), "Do not ask for info about nonexistent printers" );
+ SAL_WARN_IF( it == m_aPrinters.end(), "vcl", "Do not ask for info about nonexistent printers" );
return it != m_aPrinters.end() ? it->second.m_aInfo : aEmptyInfo;
}
@@ -555,7 +555,7 @@ void PrinterInfoManager::changePrinterInfo( const OUString& rPrinter, const Prin
{
std::unordered_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.find( rPrinter );
- DBG_ASSERT( it != m_aPrinters.end(), "Do not change nonexistent printers" );
+ SAL_WARN_IF( it == m_aPrinters.end(), "vcl", "Do not change nonexistent printers" );
if( it != m_aPrinters.end() )
{
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index c6d728dfc1a4..45da111452e6 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -375,7 +375,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
}
else if( (nSalFrameStyle & SalFrameStyleFlags::SYSTEMCHILD ) )
{
- DBG_ASSERT( mpParent, "SalFrameStyleFlags::SYSTEMCHILD window without parent" );
+ SAL_WARN_IF( !mpParent, "vcl", "SalFrameStyleFlags::SYSTEMCHILD window without parent" );
if( mpParent )
{
aFrameParent = mpParent->mhWindow;
@@ -961,7 +961,7 @@ SalGraphics *X11SalFrame::AcquireGraphics()
void X11SalFrame::ReleaseGraphics( SalGraphics *pGraphics )
{
- DBG_ASSERT( pGraphics == pGraphics_, "SalFrame::ReleaseGraphics pGraphics!=pGraphics_" );
+ SAL_WARN_IF( pGraphics != pGraphics_, "vcl", "SalFrame::ReleaseGraphics pGraphics!=pGraphics_" );
if( pGraphics != pGraphics_ )
return;
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index 5ea811adae1e..2c4d61a39cb4 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -80,7 +80,7 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
int nVisuals = 0;
XVisualInfo* pInfo = XGetVisualInfo( pDisp, VisualIDMask, &aTemplate, &nVisuals );
// only one VisualInfo structure can match the visual id
- DBG_ASSERT( nVisuals == 1, "match count for visual id is not 1" );
+ SAL_WARN_IF( nVisuals != 1, "vcl", "match count for visual id is not 1" );
unsigned int nDepth = pInfo->depth;
XFree( pInfo );
XSetWindowAttributes aAttribs;