From ed1182cb24b97ad1186ec731c48cb4ebb3de3aaa Mon Sep 17 00:00:00 2001 From: David Mak Date: Mon, 22 Jul 2024 00:09:07 +0800 Subject: [PATCH] standalone: Update format specifiers for exceptions Use platform-agnostic identifiers instead. --- nac3standalone/demo/demo.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nac3standalone/demo/demo.c b/nac3standalone/demo/demo.c index 5bf22044..7e7c7875 100644 --- a/nac3standalone/demo/demo.c +++ b/nac3standalone/demo/demo.c @@ -121,11 +121,11 @@ struct Exception { uint32_t __nac3_raise(struct Exception* e) { printf("__nac3_raise called. Exception details:\n"); - printf(" ID: %lld\n", e->id); - printf(" Location: %*s:%lld:%lld\n" , e->file.len, (const char*) e->file.data, e->line, e->column); - printf(" Function: %*s\n" , e->function.len, (const char*) e->function.data); - printf(" Message: \"%*s\"\n" , e->message.len, (const char*) e->message.data); - printf(" Params: {0}=%lld, {1}=%lld, {2}=%lld\n", e->param[0], e->param[1], e->param[2]); + printf(" ID: %"PRIu32"\n", e->id); + printf(" Location: %*s:%"PRIu32":%"PRIu32"\n" , (int) e->file.len, (const char*) e->file.data, e->line, e->column); + printf(" Function: %*s\n" , (int) e->function.len, (const char*) e->function.data); + printf(" Message: \"%*s\"\n" , (int) e->message.len, (const char*) e->message.data); + printf(" Params: {0}=%"PRId64", {1}=%"PRId64", {2}=%"PRId64"\n", e->param[0], e->param[1], e->param[2]); exit(101); __builtin_unreachable(); }