From 6ce6ef3307e52db5813d3c8d6a2cba52df06daf8 Mon Sep 17 00:00:00 2001 From: Tyge Lovset Date: Wed, 1 Feb 2023 08:38:45 +0100 Subject: Massive update from unsigned sizes and indices to signed. --- misc/examples/queue.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'misc/examples/queue.c') diff --git a/misc/examples/queue.c b/misc/examples/queue.c index 1d325fc6..ee537b58 100644 --- a/misc/examples/queue.c +++ b/misc/examples/queue.c @@ -15,17 +15,17 @@ int main() { { // Push ten million random numbers onto the queue. c_FORRANGE (n) - cqueue_i_push(&queue, stc64_uniform(&rng, &dist)); + cqueue_i_push(&queue, (int)stc64_uniform(&rng, &dist)); // Push or pop on the queue ten million times printf("%d\n", n); c_FORRANGE (n) { // forrange uses initial n only. - int r = stc64_uniform(&rng, &dist); + int r = (int)stc64_uniform(&rng, &dist); if (r & 1) ++n, cqueue_i_push(&queue, r); else --n, cqueue_i_pop(&queue); } - printf("%d, %" c_ZU "\n", n, cqueue_i_size(&queue)); + printf("%d, %" c_ZI "\n", n, cqueue_i_size(&queue)); } } -- cgit v1.2.3