aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHunter Kvalevog <hunter@kvog.sh>2026-10-15 17:56:15 -0500
committerHunter Kvalevog <hunter@kvog.sh>2026-10-16 18:56:17 -0500
commit30a80633bd59109b9ca62fec506fe16675cca357 (patch)
tree225767ffdae0f2a655843bb674ea4f0533785ea7
parentfeab53020b21fed734faac2c09bd7d520849d813 (diff)
downloaddemos-30a80633bd59109b9ca62fec506fe16675cca357.tar.gz
demos-30a80633bd59109b9ca62fec506fe16675cca357.zip
aarch64: fix GCC warnings
-rw-r--r--aarch64/kusswurm_ch11.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/aarch64/kusswurm_ch11.c b/aarch64/kusswurm_ch11.c
index a5bb5d0..ec832f4 100644
--- a/aarch64/kusswurm_ch11.c
+++ b/aarch64/kusswurm_ch11.c
@@ -11,6 +11,7 @@
// WITH REGARD TO THIS SOFTWARE.
// ================================================================================================
+#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
@@ -41,13 +42,13 @@ int main(int argc, const char* argv[])
// example 1
X("%d", i32_add_sub(5, 3, 1));
- X("%lld", i64_add_sub(5, 3, 1));
+ X("%" PRId64, i64_add_sub(5, 3, 1));
// example 2
X("%d", i32_mul(5, 6));
X("%d", i32_mul(2000000000, 4));
- X("%lld", i32_mul_safe(5, 6));
- X("%lld", i32_mul_safe(2000000000, 4));
+ X("%" PRId64, i32_mul_safe(5, 6));
+ X("%" PRId64, i32_mul_safe(2000000000, 4));
#undef X
#define X(CODE) CODE; printf(#CODE ": quo=%d rem=%d\n", quo, rem)