From 91f39a558782d291aafeca759d8faa5fdb6ba802 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 24 Jul 2018 11:56:25 +0200 Subject: smptests: Fix format warnings --- testsuites/smptests/smpschedaffinity01/init.c | 41 +++++++++++++++++++-------- testsuites/smptests/smpschedaffinity05/init.c | 9 ++++-- 2 files changed, 36 insertions(+), 14 deletions(-) (limited to 'testsuites') diff --git a/testsuites/smptests/smpschedaffinity01/init.c b/testsuites/smptests/smpschedaffinity01/init.c index 2d4585f3a4..5e27f612dd 100644 --- a/testsuites/smptests/smpschedaffinity01/init.c +++ b/testsuites/smptests/smpschedaffinity01/init.c @@ -93,7 +93,11 @@ static void test(void) /* Skip if this cpu doesn't exist, don't create task */ if ( task_data[i].expected_cpu >= cpu_count ) { - printf( "Skipping TA0%d because on a core we do not have\n", i ); + printf( + "Skipping TA0%" PRIdrtems_task_argument + " because on a core we do not have\n", + i + ); continue; } @@ -106,34 +110,47 @@ static void test(void) &task_data[ i ].id ); rtems_test_assert(sc == RTEMS_SUCCESSFUL); - - printf("Set TA%d affinity to cpu %d\n", i, task_data[i].expected_cpu ); + + printf( + "Set TA%" PRIdrtems_task_argument " affinity to cpu %d\n", + i, + task_data[i].expected_cpu + ); sc = rtems_task_set_affinity( task_data[ i ].id, size, &task_data[i].cpuset ); rtems_test_assert(sc == RTEMS_SUCCESSFUL); - - printf("Start TA%d on cpu %d\n", i, task_data[i].expected_cpu); + + printf( + "Start TA%" PRIdrtems_task_argument " on cpu %d\n", + i, + task_data[i].expected_cpu + ); sc = rtems_task_start( task_data[ i ].id, task, i ); rtems_test_assert(sc == RTEMS_SUCCESSFUL); } /* spin for 100 ticks */ test_delay(100); - + printf("Verify Tasks Ran\n"); for (i = 0; i < NUM_CPUS; i++) { /* Skip if this cpu doesn't exist, task doesn't exist */ if ( task_data[i].expected_cpu >= cpu_count ) { - printf( "Skipping TA0%d because on a core we do not have\n", i ); + printf( + "Skipping TA0%" PRIdrtems_task_argument + " because on a core we do not have\n", + i + ); continue; } /* print the expected and actual values */ - printf( "TA0%d: ran=%d expected=%d actual=%d\n", - i, - task_data[i].ran, - task_data[i].expected_cpu, - task_data[i].actual_cpu + printf( + "TA0%" PRIdrtems_task_argument ": ran=%d expected=%d actual=%d\n", + i, + task_data[i].ran, + task_data[i].expected_cpu, + task_data[i].actual_cpu ); /* Abort test if values are not as expected */ diff --git a/testsuites/smptests/smpschedaffinity05/init.c b/testsuites/smptests/smpschedaffinity05/init.c index 4c8faaae1c..632cbef1dc 100644 --- a/testsuites/smptests/smpschedaffinity05/init.c +++ b/testsuites/smptests/smpschedaffinity05/init.c @@ -176,7 +176,8 @@ static void test(void) rtems_test_assert(sc == RTEMS_SUCCESSFUL); printf( - "Start TA%d at priority %" PRIu32 " on cpu %d\n", + "Start TA%" PRIdrtems_task_argument " at priority %" + PRIu32 " on cpu %d\n", i, task_data[i].priority, task_data[i].expected_cpu @@ -192,7 +193,11 @@ static void test(void) i = TASK_COUNT - 1; task_data[ i ].priority = 4; - printf("Set TA%d priority %" PRIu32 "\n", i,task_data[i].priority ); + printf( + "Set TA%" PRIdrtems_task_argument " priority %" PRIu32 "\n", + i, + task_data[i].priority + ); sc = rtems_task_set_priority( task_data[ i ].id, task_data[ i ].priority, -- cgit v1.2.3