From ab3fa05996af69979669af49436fbad92733bf7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Bourdeauducq?= Date: Wed, 10 Jan 2024 18:35:12 +0800 Subject: [PATCH] demo: use portable format strings --- nac3standalone/demo/demo.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nac3standalone/demo/demo.c b/nac3standalone/demo/demo.c index f272c353..532bd10b 100644 --- a/nac3standalone/demo/demo.c +++ b/nac3standalone/demo/demo.c @@ -4,6 +4,7 @@ #include #include #include +#include #if __SIZEOF_POINTER__ == 8 #define usize uint64_t @@ -26,19 +27,19 @@ void output_bool(bool x) { } void output_int32(int32_t x) { - printf("%d\n", x); + printf("%"PRId32"\n", x); } void output_int64(int64_t x) { - printf("%lld\n", x); + printf("%"PRId64"\n", x); } void output_uint32(uint32_t x) { - printf("%u\n", x); + printf("%"PRIu32"\n", x); } void output_uint64(uint64_t x) { - printf("%llu\n", x); + printf("%"PRIu64"\n", x); } void output_float64(double x) {