Warning fixes

This commit is contained in:
Robert Osfield 2008-10-29 11:15:33 +00:00
parent d7bc94d7cd
commit 3d07ab5664

View File

@ -198,13 +198,13 @@ void ThreadPrivateActions::PrintThreadSchedulingInfo(Thread *thread) {
if(status != 0 || my_policy == -1) { if(status != 0 || my_policy == -1) {
printf("THREAD INFO (%d) : Get sched param: %s/%s\n", printf("THREAD INFO (%d) : Get sched param: %s/%s\n",
thread->getProcessId(), unsigned int(thread->getProcessId()),
strerror(status), strerror(status),
strerror(errno)); strerror(errno));
} else { } else {
printf( printf(
"THREAD INFO (%d) : Thread running at %s / Priority: %d\n", "THREAD INFO (%d) : Thread running at %s / Priority: %d\n",
thread->getProcessId(), unsigned int(thread->getProcessId()),
(my_policy == SCHED_FIFO ? "SCHEDULE_FIFO" (my_policy == SCHED_FIFO ? "SCHEDULE_FIFO"
: (my_policy == SCHED_RR ? "SCHEDULE_ROUND_ROBIN" : (my_policy == SCHED_RR ? "SCHEDULE_ROUND_ROBIN"
: (my_policy == SCHED_TS ? "SCHEDULE_TIME_SHARE" : (my_policy == SCHED_TS ? "SCHEDULE_TIME_SHARE"
@ -217,7 +217,7 @@ void ThreadPrivateActions::PrintThreadSchedulingInfo(Thread *thread) {
printf( printf(
"THREAD INFO (%d) : Max priority: %d, Min priority: %d\n", "THREAD INFO (%d) : Max priority: %d, Min priority: %d\n",
thread->getProcessId(), unsigned int(thread->getProcessId()),
max_priority, min_priority); max_priority, min_priority);
} }
@ -806,8 +806,6 @@ int OpenThreads::GetNumberOfProcessors()
int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum) int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum)
{ {
if (cpunum<0) return -1;
Thread::Init(); Thread::Init();
Thread* thread = Thread::CurrentThread(); Thread* thread = Thread::CurrentThread();