From b84f1fdc0dddc6f5293b863f511c4f799a653b96 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 10 May 2009 14:39:46 +0000 Subject: 2009-05-10 Joel Sherrill * sp04/system.h, sp04/task1.c, sp04/tswitch.c, sp07/init.c, sp12/init.c, sp13/putbuff.c, sp13/system.h, sp13/task1.c, sp15/init.c, sp16/system.h, sp19/fptask.c, sp25/system.h, sp26/task1.c, sp27/init.c, sp28/init.c, sp29/init.c, sp31/task1.c, sp33/init.c, sp34/changepri.c, sp35/priinv.c, sp37/init.c, sp38/init.c, sp39/init.c, sp41/init.c, sp42/init.c, sp43/init.c, sp44/init.c, sp45/init.c, sp46/init.c, sp47/init.c, sp48/init.c, spfatal03/testcase.h, spfatal05/testcase.h, spfatal06/testcase.h, spfatal_support/system.h, spobjgetnext/init.c, spsize/getint.c, spsize/size.c: Fix warnings. --- testsuites/sptests/sp34/changepri.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'testsuites/sptests/sp34') diff --git a/testsuites/sptests/sp34/changepri.c b/testsuites/sptests/sp34/changepri.c index 71a16fdcff..16e1574919 100644 --- a/testsuites/sptests/sp34/changepri.c +++ b/testsuites/sptests/sp34/changepri.c @@ -2,6 +2,10 @@ * Test program to demonstrate reordering of threads on thread queues * when their priority changes. * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * * $Id$ */ @@ -24,11 +28,13 @@ #include "tmacros.h" rtems_task BlockingTasks(rtems_task_argument arg); +rtems_task Init(rtems_task_argument ignored); +const char *CallerName(void); /* * CallerName -- print the calling tasks name or id as configured */ -const char *CallerName() +const char *CallerName(void) { static char buffer[32]; #if defined(TEST_PRINT_TASK_ID) @@ -110,7 +116,7 @@ rtems_task Init(rtems_task_argument ignored) for (i = 0; i < NUMBER_OF_BLOCKING_TASKS; i++) { status = rtems_task_create( rtems_build_name('B','L','K','0'+i), /* Name */ - 2+i, /* Priority */ + (rtems_task_priority) 2+i, /* Priority */ RTEMS_MINIMUM_STACK_SIZE*2, /* Stack size (8KB) */ RTEMS_DEFAULT_MODES | RTEMS_NO_ASR, /* Mode */ RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, /* Attributes */ @@ -118,7 +124,11 @@ rtems_task Init(rtems_task_argument ignored) directive_failed( status, "rtems_task_create (BLKn)" ); printf( "Blockers[%d] Id = 0x%08x\n", i, Blockers[i] ); - status = rtems_task_start(Blockers[i], BlockingTasks, i); + status = rtems_task_start( + Blockers[i], + BlockingTasks, + (rtems_task_argument)i + ); directive_failed( status, "rtems_task_start (BLKn)" ); } @@ -128,7 +138,9 @@ rtems_task Init(rtems_task_argument ignored) puts( "rtems_task_set_priority -- invert priorities of tasks" ); for (i = 0; i < NUMBER_OF_BLOCKING_TASKS; i++) { rtems_task_priority opri; - rtems_task_priority npri= 2 + NUMBER_OF_BLOCKING_TASKS - i - 1; + rtems_task_priority npri; + + npri = (rtems_task_priority) (2 + NUMBER_OF_BLOCKING_TASKS - i - 1); status = rtems_task_set_priority(Blockers[i], npri, &opri); directive_failed( status, "rtems_task_set_priority" ); -- cgit v1.2.3