From 36cf3121d161f07c16312bac2d63ac464775a4f8 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Mon, 9 Sep 2024 08:59:28 +0200 Subject: [PATCH] Fix implicit signed conversions --- src/emu/ovnisort.c | 2 +- test/emu/ovni/sort-into-previous-region.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/emu/ovnisort.c b/src/emu/ovnisort.c index 8f621b9..812f091 100644 --- a/src/emu/ovnisort.c +++ b/src/emu/ovnisort.c @@ -296,7 +296,7 @@ rebuild_ring(struct ring *r, long long start, struct ovni_ev *first, struct ovni die("exceeding last pointer"); r->ev[i] = ev; - size_t size = ovni_ev_size(ev); + size_t size = (size_t) ovni_ev_size(ev); ev = (struct ovni_ev *) (((uint8_t *) ev) + size); } diff --git a/test/emu/ovni/sort-into-previous-region.c b/test/emu/ovni/sort-into-previous-region.c index 01142f1..2f0942d 100644 --- a/test/emu/ovni/sort-into-previous-region.c +++ b/test/emu/ovni/sort-into-previous-region.c @@ -19,7 +19,7 @@ */ static void -emit(char *mcv, int64_t clock, int size) +emit(char *mcv, uint64_t clock, int size) { struct ovni_ev ev = {0}; ovni_ev_set_mcv(&ev, mcv); @@ -40,7 +40,7 @@ main(void) /* Leave some room to prevent clashes */ sleep_us(100); /* 100000 us */ - int64_t t0 = ovni_clock_now(); + uint64_t t0 = ovni_clock_now(); sleep_us(100); /* 100000 us */ /* We want it to end like this: