From 58b927eb70eda1764cdd79a9f7cdf2fdc5faf119 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Wed, 6 Sep 2023 17:01:36 +0000 Subject: [PATCH] samples: philosophers: fix wrong assert type zephyrproject/zephyr/samples/philosophers/src/main.c: In function 'philosopher': zephyrproject/zephyr/include/zephyr/sys/__assert.h:44:52: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'stack_data_t' {aka 'long unsigned int'} [-Wformat=] Signed-off-by: Fabio Baltieri --- samples/philosophers/src/phil_obj_abstract.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/philosophers/src/phil_obj_abstract.h b/samples/philosophers/src/phil_obj_abstract.h index 9277ce8a1e7268..e749a3f8d49828 100644 --- a/samples/philosophers/src/phil_obj_abstract.h +++ b/samples/philosophers/src/phil_obj_abstract.h @@ -87,7 +87,7 @@ #endif #define take(x) do { \ stack_data_t data; k_stack_pop(x, &data, K_FOREVER); \ - __ASSERT(data == MAGIC, "data was %x\n", data); \ + __ASSERT(data == MAGIC, "data was %lx\n", data); \ } while ((0)) #define drop(x) k_stack_push(x, MAGIC) #define fork_type_str "stacks"