From 362077d3d53b1ffb32e7151367940d411d04df64 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 8 Nov 2016 16:28:40 +0100 Subject: [PATCH] tests: fix sizeof_tcb output --- tests/sizeof_tcb/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/sizeof_tcb/main.c b/tests/sizeof_tcb/main.c index fe30ab011d..66f4650cff 100644 --- a/tests/sizeof_tcb/main.c +++ b/tests/sizeof_tcb/main.c @@ -23,13 +23,15 @@ #include "thread.h" -#define P(NAME) printf("\t%-*s%4zu%4zu\n", 11, #NAME, sizeof(((thread_t *) 0)->NAME), offsetof(thread_t, NAME)); +#define P(NAME) printf("\t%-*s%4u%4u\n", 11, #NAME, \ + (unsigned)sizeof(((thread_t *) 0)->NAME), \ + (unsigned)offsetof(thread_t, NAME)); int main(void) { puts("\tmember, sizeof, offsetof"); - printf("sizeof(thread_t): %zu\n", sizeof(thread_t)); + printf("sizeof(thread_t): %u\n", (unsigned)sizeof(thread_t)); P(sp); P(status);