From 9b86291bca3c2d7b7b7e1a839ce57cb4ff823374 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Sat, 24 Oct 2009 05:52:48 +0000 Subject: Various warning fixes. --- testsuites/samples/unlimited/init.c | 3 --- testsuites/samples/unlimited/test1.c | 10 ++++++---- testsuites/samples/unlimited/test2.c | 18 ++++++++++-------- testsuites/samples/unlimited/test3.c | 9 +++++---- 4 files changed, 21 insertions(+), 19 deletions(-) (limited to 'testsuites/samples/unlimited') diff --git a/testsuites/samples/unlimited/init.c b/testsuites/samples/unlimited/init.c index 035374752d..31ee41483c 100644 --- a/testsuites/samples/unlimited/init.c +++ b/testsuites/samples/unlimited/init.c @@ -28,9 +28,6 @@ rtems_id task_id[MAX_TASKS]; -void test1(); -void test2(); - rtems_task Init( rtems_task_argument ignored ) diff --git a/testsuites/samples/unlimited/test1.c b/testsuites/samples/unlimited/test1.c index b8eb4e304a..18cccfa24d 100644 --- a/testsuites/samples/unlimited/test1.c +++ b/testsuites/samples/unlimited/test1.c @@ -17,11 +17,13 @@ * $Id$ */ -#include "system.h" -#include +#include #include #include +#include "system.h" +#include + void test1() { bool auto_extend; @@ -64,7 +66,7 @@ void test1() if (status_code_bad(result)) break; - printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]); + printf("number = %3" PRIi32 ", id = %08x, starting, ", task_count, task_id[task_count]); fflush(stdout); result = rtems_task_start(task_id[task_count], @@ -88,7 +90,7 @@ void test1() if (task_count != (TASK_ALLOCATION_SIZE - 1)) { printf( " FAIL1 : the number of tasks does not equal the expected size -\n" - " task created = %i, required number = %i\n", + " task created = %" PRIi32 ", required number = %i\n", task_count, TASK_ALLOCATION_SIZE); exit( 1 ); } diff --git a/testsuites/samples/unlimited/test2.c b/testsuites/samples/unlimited/test2.c index 30c5a7d9ea..d8041df399 100644 --- a/testsuites/samples/unlimited/test2.c +++ b/testsuites/samples/unlimited/test2.c @@ -20,10 +20,12 @@ * $Id$ */ -#include "system.h" +#include #include #include +#include "system.h" + void test2() { rtems_status_code result; @@ -63,7 +65,7 @@ void test2() if (status_code_bad(result)) break; - printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]); + printf("number = %3" PRIi32 ", id = %08x, starting, ", task_count, task_id[task_count]); fflush(stdout); result = rtems_task_start(task_id[task_count], @@ -88,7 +90,7 @@ void test2() if (task_count != ((TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET)) { printf( " FAIL2 : not enough tasks created -\n" - " task created = %i, required number = %i\n", + " task created = %" PRIi32 ", required number = %i\n", task_count, (TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET); destory_all_tasks("TEST2"); exit( 1 ); @@ -105,7 +107,7 @@ void test2() if (!task_id[remove_task]) { printf( " FAIL2 : remove task has a 0 id -\n" - " task number = %i\n", + " task number = %" PRIi32 "\n", remove_task); destory_all_tasks("TEST2"); exit( 1 ); @@ -117,7 +119,7 @@ void test2() removed_ids[task++] = task_id[remove_task]; - printf(" TEST2 : block %i remove, signal task %08x, ", block, task_id[remove_task]); + printf(" TEST2 : block %" PRIi32 " remove, signal task %08x, ", block, task_id[remove_task]); rtems_event_send(task_id[remove_task], 1); task_id[remove_task] = 0; } @@ -157,13 +159,13 @@ void test2() if (status_code_bad(result)) { printf( " FAIL2 : re-creating a task -\n" - " task number = %i\n", + " task number = %" PRIi32 "\n", id_slot); destory_all_tasks("TEST2"); exit( 1 ); } - printf("number = %3i, id = %08x, starting, ", task_count, task_id[id_slot]); + printf("number = %3" PRIi32 ", id = %08x, starting, ", task_count, task_id[id_slot]); result = rtems_task_start(task_id[id_slot], test_task, @@ -172,7 +174,7 @@ void test2() if (status_code_bad(result)) { printf( " FAIL : re-starting a task -\n" - " task number = %i\n", + " task number = %" PRIi32 "\n", id_slot); destory_all_tasks("TEST2"); exit( 1 ); diff --git a/testsuites/samples/unlimited/test3.c b/testsuites/samples/unlimited/test3.c index ad2ca95e72..fedc23d0d0 100644 --- a/testsuites/samples/unlimited/test3.c +++ b/testsuites/samples/unlimited/test3.c @@ -20,9 +20,10 @@ * $Id$ */ -#include "system.h" +#include #include #include +#include "system.h" void test3() { @@ -71,7 +72,7 @@ void test3() if (status_code_bad(result)) break; - printf("number = %3i, id = %08x, starting, ", task_count, task_id[task_count]); + printf("number = %3" PRIi32 ", id = %08x, starting, ", task_count, task_id[task_count]); fflush(stdout); result = rtems_task_start(task_id[task_count], @@ -98,7 +99,7 @@ void test3() if (task_count < (TASK_ALLOCATION_SIZE * 11)) { printf( " FAIL3 : not enough tasks created -\n" - " task created = %i, required number = %i\n", + " task created = %" PRIi32 ", required number = %i\n", task_count, (TASK_ALLOCATION_SIZE * 11)); exit( 1 ); } @@ -112,7 +113,7 @@ void test3() if (!task_id[remove_task]) { printf( " FAIL3 : remove task has a 0 id -\n" - " task number = %i\n", + " task number = %" PRIi32 "\n", remove_task); exit( 1 ); } -- cgit v1.2.3