Reverted the usage of OSG_UNUSED and OT_UNUSED as in hindsight these should never have been merged. Adding code to quieten

inappropriate warnings is a bad programming practice and does not desrve a place in the OSG code base.
This commit is contained in:
Robert Osfield
2013-07-01 08:21:13 +00:00
parent e876e0bad3
commit a64b412885
11 changed files with 15 additions and 64 deletions

View File

@@ -1,13 +1,13 @@
/* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
@@ -238,8 +238,7 @@ private:
}
fflush(stdout);
#else // ] ALLOW_PRIORITY_SCHEDULING
OT_UNUSED(thread);
#endif // ] ALLOW_PRIORITY_SCHEDULING
}
@@ -347,8 +346,6 @@ private:
}
#else // ] ALLOW_PRIORITY_SCHEDULING
OT_UNUSED(thread);
#endif // ] ALLOW_PRIORITY_SCHEDULING
return status;
@@ -369,7 +366,6 @@ int Thread::SetConcurrency(int concurrencyLevel)
#if defined (HAVE_PTHREAD_SETCONCURRENCY)
return pthread_setconcurrency(concurrencyLevel);
#else
OT_UNUSED(concurrencyLevel);
return -1;
#endif
@@ -440,7 +436,7 @@ Thread::~Thread()
}
delete pd;
_prvData = 0;
}
@@ -554,7 +550,7 @@ int Thread::setProcessorAffinity(unsigned int cpunum)
PThreadPrivateData *pd = static_cast<PThreadPrivateData *> (_prvData);
pd->cpunum = cpunum;
if (pd->cpunum<0) return -1;
#ifdef __sgi
int status;
@@ -696,7 +692,7 @@ int Thread::start() {
//
int Thread::startThread()
{
if (_prvData) return start();
if (_prvData) return start();
else return 0;
}
@@ -843,7 +839,6 @@ int Thread::setSchedulePriority(ThreadPriority priority) {
return 0;
#else
OT_UNUSED(priority);
return -1;
#endif
@@ -883,7 +878,6 @@ int Thread::setSchedulePolicy(ThreadPolicy policy)
else
return 0;
#else
OT_UNUSED(policy);
return -1;
#endif
@@ -1015,7 +1009,7 @@ int OpenThreads::GetNumberOfProcessors()
uint64_t num_cpus = 0;
size_t num_cpus_length = sizeof(num_cpus);
#if defined(__FreeBSD__)
sysctlbyname("hw.ncpu", &num_cpus, &num_cpus_length, NULL, 0);
sysctlbyname("hw.ncpu", &num_cpus, &num_cpus_length, NULL, 0);
#else
sysctlbyname("hw.activecpu", &num_cpus, &num_cpus_length, NULL, 0);
#endif
@@ -1030,7 +1024,7 @@ int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum)
Thread::Init();
Thread* thread = Thread::CurrentThread();
if (thread)
if (thread)
{
return thread->setProcessorAffinity(cpunum);
}
@@ -1052,6 +1046,6 @@ int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum)
#endif
#endif
}
return -1;
}