Skip to content

Commit

Permalink
fix warnings on MacOS
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias J. Kannwischer <[email protected]>
  • Loading branch information
mkannwischer committed Jun 19, 2024
1 parent c0fc880 commit 7061929
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions test/bench_kyber.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "kem.h"
#include "hal.h"
#include "randombytes.h"
Expand Down Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions test/hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
#include "hal.h"

void enable_cyclecounter()
void enable_cyclecounter(void)
{
uint64_t tmp;
__asm __volatile (
Expand All @@ -37,7 +37,7 @@ void enable_cyclecounter()
);
}

void disable_cyclecounter()
void disable_cyclecounter(void)
{
uint64_t tmp;
__asm __volatile (
Expand All @@ -48,7 +48,7 @@ void disable_cyclecounter()
);
}

uint64_t get_cyclecounter()
uint64_t get_cyclecounter(void)
{
uint64_t retval;
__asm __volatile (
Expand Down

0 comments on commit 7061929

Please sign in to comment.