mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023947: Eliminate trivial compiler warnings in MSVC++ with warning level 4
Fix first subset of warnings (about 100) - while(1) and similar constructs replaced by for(;;) - some uninitialized variables corrected Got rid of Warning C4189: local variable is initialised but not referenced Corrected mistakes after getting rid of C4189 compiler warning Corrected some mistakes that led to compiling errors Fixed test case because of improvement message - removed unnecessary TODO. Small fix: tabs have been replaced with whitespaces. Added TODO for Windows platform removed last TODO Corrected mistakes, returned some #ifdef DEB code, fixed test case . Restoring a few places which have been modified too much Small grammar fix Deleted unnecessary puts in bugs/end
This commit is contained in:
@@ -44,6 +44,8 @@ namespace
|
||||
|
||||
#define IMEM_FREE(p_bl) (size_t(p_bl->p_end_block - p_bl->p_free_space))
|
||||
|
||||
// auxiliary dummy function used to get a place where break point can be set
|
||||
inline void place_for_breakpoint() {}
|
||||
};
|
||||
|
||||
#define MaxLookup 16
|
||||
@@ -82,6 +84,8 @@ Standard_EXPORT void IncAllocator_SetDebugFlag(const Standard_Boolean theDebug)
|
||||
IS_DEBUG = theDebug;
|
||||
}
|
||||
|
||||
#ifdef DEB
|
||||
|
||||
//=======================================================================
|
||||
/**
|
||||
* Static value of the current allocation ID. It provides unique
|
||||
@@ -102,12 +106,9 @@ static void Debug_Create(Standard_Address theAlloc)
|
||||
aMutex.Lock();
|
||||
StorageIDMap().Bind(theAlloc, ++CurrentID);
|
||||
StorageIDSet().Add(CurrentID);
|
||||
aMutex.Unlock();
|
||||
if (CurrentID == CATCH_ID)
|
||||
{
|
||||
// Place for break point for creation of investigated allocator
|
||||
int a = 1;
|
||||
}
|
||||
place_for_breakpoint();
|
||||
aMutex.Unlock();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -128,6 +129,8 @@ static void Debug_Destroy(Standard_Address theAlloc)
|
||||
aMutex.Unlock();
|
||||
}
|
||||
|
||||
#endif /* DEB */
|
||||
|
||||
//=======================================================================
|
||||
//function : IncAllocator_PrintAlive
|
||||
//purpose : Outputs the alive numbers to the file inc_alive.d
|
||||
|
Reference in New Issue
Block a user