smptests: Fix format warnings

This commit is contained in:
Sebastian Huber
2018-07-24 11:56:25 +02:00
parent bf199e0c33
commit 91f39a5587
2 changed files with 36 additions and 14 deletions

View File

@@ -93,7 +93,11 @@ static void test(void)
/* Skip if this cpu doesn't exist, don't create task */ /* Skip if this cpu doesn't exist, don't create task */
if ( task_data[i].expected_cpu >= cpu_count ) { 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; continue;
} }
@@ -107,11 +111,19 @@ static void test(void)
); );
rtems_test_assert(sc == RTEMS_SUCCESSFUL); 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 ); sc = rtems_task_set_affinity( task_data[ i ].id, size, &task_data[i].cpuset );
rtems_test_assert(sc == RTEMS_SUCCESSFUL); 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 ); sc = rtems_task_start( task_data[ i ].id, task, i );
rtems_test_assert(sc == RTEMS_SUCCESSFUL); rtems_test_assert(sc == RTEMS_SUCCESSFUL);
} }
@@ -124,16 +136,21 @@ static void test(void)
/* Skip if this cpu doesn't exist, task doesn't exist */ /* Skip if this cpu doesn't exist, task doesn't exist */
if ( task_data[i].expected_cpu >= cpu_count ) { 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; continue;
} }
/* print the expected and actual values */ /* print the expected and actual values */
printf( "TA0%d: ran=%d expected=%d actual=%d\n", printf(
i, "TA0%" PRIdrtems_task_argument ": ran=%d expected=%d actual=%d\n",
task_data[i].ran, i,
task_data[i].expected_cpu, task_data[i].ran,
task_data[i].actual_cpu task_data[i].expected_cpu,
task_data[i].actual_cpu
); );
/* Abort test if values are not as expected */ /* Abort test if values are not as expected */

View File

@@ -176,7 +176,8 @@ static void test(void)
rtems_test_assert(sc == RTEMS_SUCCESSFUL); rtems_test_assert(sc == RTEMS_SUCCESSFUL);
printf( printf(
"Start TA%d at priority %" PRIu32 " on cpu %d\n", "Start TA%" PRIdrtems_task_argument " at priority %"
PRIu32 " on cpu %d\n",
i, i,
task_data[i].priority, task_data[i].priority,
task_data[i].expected_cpu task_data[i].expected_cpu
@@ -192,7 +193,11 @@ static void test(void)
i = TASK_COUNT - 1; i = TASK_COUNT - 1;
task_data[ i ].priority = 4; 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( sc = rtems_task_set_priority(
task_data[ i ].id, task_data[ i ].id,
task_data[ i ].priority, task_data[ i ].priority,