1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0026780: Coding rules - eliminate warnings on Linux and Mac

Avoid warnings by means of ifdef/ifndef or removing unused code.
This commit is contained in:
rkv
2015-11-06 14:22:16 +03:00
committed by abv
parent c9246067a1
commit d48df25df1
11 changed files with 84 additions and 286 deletions

View File

@@ -411,13 +411,13 @@ static unsigned int __stdcall CpuFunc (void * /*param*/)
aCurrent = clock_t(anUserSeconds + aSystemSeconds);
anElapCurrent = clock_t(aTimer.ElapsedTime());
if ((aCurrent - CPU_CURRENT) >= CPU_LIMIT)
if (CPU_LIMIT > 0 && (aCurrent - CPU_CURRENT) >= CPU_LIMIT)
{
cout << "Process killed by CPU limit (" << CPU_LIMIT << " sec)" << endl;
aTimer.Stop();
ExitProcess (2);
}
if ((anElapCurrent) >= CPU_LIMIT)
if (CPU_LIMIT > 0 && anElapCurrent >= CPU_LIMIT)
{
cout << "Process killed by elapsed limit (" << CPU_LIMIT << " sec)" << endl;
aTimer.Stop();
@@ -438,9 +438,7 @@ static void *CpuFunc(void* /*threadarg*/)
{
sleep (5);
anElapCurrent = clock_t(aTimer.ElapsedTime());
if ( CPU_LIMIT < 0 )
return NULL;
if ((anElapCurrent) >= CPU_LIMIT) {
if (CPU_LIMIT >0 && (anElapCurrent) >= CPU_LIMIT) {
cout << "Process killed by elapsed limit (" << CPU_LIMIT << " sec)" << endl;
exit(2);
}