1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #6078 from miri64/tests/fix/sizeof_tcb

tests: fix sizeof_tcb output
This commit is contained in:
Francisco Acosta 2016-11-08 18:20:27 +01:00 committed by GitHub
commit d5db066cee

View File

@ -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);