From 618c3db8854d237918950136d09fa6594184cd32 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Tue, 31 Jan 2017 14:28:58 +0100 Subject: [PATCH] tests: thread_cooperation: fix for <32bit platforms --- tests/thread_cooperation/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/thread_cooperation/main.c b/tests/thread_cooperation/main.c index 41b2e16d66..bf97004cde 100644 --- a/tests/thread_cooperation/main.c +++ b/tests/thread_cooperation/main.c @@ -28,7 +28,7 @@ mutex_t mtx = MUTEX_INIT; -volatile int storage = 1; +volatile uint32_t storage = 1; kernel_pid_t main_id = KERNEL_PID_UNDEF; kernel_pid_t ths[PROBLEM]; char stacks[PROBLEM][THREAD_STACKSIZE_MAIN]; @@ -93,9 +93,9 @@ int main(void) printf("Reveiced message %d from thread %" PRIu32 "\n", i, msg.content.value); } - printf("Factorial: %d\n", storage); + printf("Factorial: %"PRIu32"\n", storage); - if (storage != 479001600) { + if (storage != 479001600LU) { puts("[!!!] Error, expected: 12!= 479001600."); }