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:
@@ -74,9 +74,10 @@ Standard_MMgrFactory::Standard_MMgrFactory()
|
||||
#endif*/
|
||||
|
||||
char* aVar;
|
||||
Standard_Integer anAllocId = (aVar = getenv ("MMGT_OPT" )) ? atoi (aVar) :
|
||||
(OCCT_MMGT_OPT_DEFAULT);
|
||||
Standard_Boolean toClear = (aVar = getenv ("MMGT_CLEAR" )) ? (atoi (aVar) != 0) : Standard_True;
|
||||
aVar = getenv ("MMGT_OPT");
|
||||
Standard_Integer anAllocId = (aVar ? atoi (aVar): OCCT_MMGT_OPT_DEFAULT);
|
||||
aVar = getenv ("MMGT_CLEAR");
|
||||
Standard_Boolean toClear = (aVar ? (atoi (aVar) != 0) : Standard_True);
|
||||
|
||||
// on Windows (actual for XP and 2000) activate low fragmentation heap
|
||||
// for CRT heap in order to get best performance.
|
||||
@@ -95,10 +96,14 @@ Standard_MMgrFactory::Standard_MMgrFactory()
|
||||
{
|
||||
case 1: // OCCT optimized memory allocator
|
||||
{
|
||||
Standard_Boolean bMMap = (aVar = getenv ("MMGT_MMAP" )) ? (atoi (aVar) != 0) : Standard_True;
|
||||
Standard_Integer aCellSize = (aVar = getenv ("MMGT_CELLSIZE" )) ? atoi (aVar) : 200;
|
||||
Standard_Integer aNbPages = (aVar = getenv ("MMGT_NBPAGES" )) ? atoi (aVar) : 1000;
|
||||
Standard_Integer aThreshold = (aVar = getenv ("MMGT_THRESHOLD")) ? atoi (aVar) : 40000;
|
||||
aVar = getenv ("MMGT_MMAP");
|
||||
Standard_Boolean bMMap = (aVar ? (atoi (aVar) != 0) : Standard_True);
|
||||
aVar = getenv ("MMGT_CELLSIZE");
|
||||
Standard_Integer aCellSize = (aVar ? atoi (aVar) : 200);
|
||||
aVar = getenv ("MMGT_NBPAGES");
|
||||
Standard_Integer aNbPages = (aVar ? atoi (aVar) : 1000);
|
||||
aVar = getenv ("MMGT_THRESHOLD");
|
||||
Standard_Integer aThreshold = (aVar ? atoi (aVar) : 40000);
|
||||
myFMMgr = new Standard_MMgrOpt (toClear, bMMap, aCellSize, aNbPages, aThreshold);
|
||||
break;
|
||||
}
|
||||
|
@@ -796,7 +796,7 @@ retry:
|
||||
HANDLE * aMBlock = NULL;
|
||||
// check for error and try allocating address space
|
||||
if ( ! hMap || GetLastError() == ERROR_ALREADY_EXISTS ||
|
||||
! (aMBlock = (HANDLE*)MapViewOfFile(hMap,FILE_MAP_WRITE,0,0,0)) )
|
||||
! ((aMBlock = (HANDLE*)MapViewOfFile(hMap,FILE_MAP_WRITE,0,0,0))) )
|
||||
{
|
||||
// close handle if allocated
|
||||
if ( hMap )
|
||||
|
Reference in New Issue
Block a user