From 706192904beca560e3833f4e5422e75b88444d9b Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Wed, 19 Jun 2024 15:54:50 +0800 Subject: [PATCH] fix warnings on MacOS Signed-off-by: Matthias J. Kannwischer --- test/bench_kyber.c | 7 ++++--- test/hal.c | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/bench_kyber.c b/test/bench_kyber.c index 6025c74d0..ae0f4747c 100644 --- a/test/bench_kyber.c +++ b/test/bench_kyber.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "kem.h" #include "hal.h" #include "randombytes.h" @@ -89,9 +90,9 @@ static int bench(void) qsort(cycles_enc, NTESTS, sizeof(uint64_t), cmp_uint64_t); qsort(cycles_dec, NTESTS, sizeof(uint64_t), cmp_uint64_t); - printf("keypair cycles=%lu\n", cycles_kg[NTESTS >> 1]/NITERERATIONS); - printf("encaps cycles=%lu\n", cycles_enc[NTESTS >> 1]/NITERERATIONS); - printf("decaps cycles=%lu\n", cycles_dec[NTESTS >> 1]/NITERERATIONS); + printf("keypair cycles=%"PRIu64"\n", cycles_kg[NTESTS >> 1]/NITERERATIONS); + printf("encaps cycles=%"PRIu64"\n", cycles_enc[NTESTS >> 1]/NITERERATIONS); + printf("decaps cycles=%"PRIu64"\n", cycles_dec[NTESTS >> 1]/NITERERATIONS); return 0; } diff --git a/test/hal.c b/test/hal.c index b0a83ad3c..13f3ed28a 100644 --- a/test/hal.c +++ b/test/hal.c @@ -23,7 +23,7 @@ */ #include "hal.h" -void enable_cyclecounter() +void enable_cyclecounter(void) { uint64_t tmp; __asm __volatile ( @@ -37,7 +37,7 @@ void enable_cyclecounter() ); } -void disable_cyclecounter() +void disable_cyclecounter(void) { uint64_t tmp; __asm __volatile ( @@ -48,7 +48,7 @@ void disable_cyclecounter() ); } -uint64_t get_cyclecounter() +uint64_t get_cyclecounter(void) { uint64_t retval; __asm __volatile (