mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests: fix sizeof_tcb output
This commit is contained in:
parent
0c22fffcd1
commit
362077d3d5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user