From 16cbf930223b0ea8501be5ec6bfbb22ab08ead77 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Wed, 1 Feb 2023 19:54:07 +0000 Subject: Adjust int type in run_func.c The arity of the function should be cast to an integer type that's the same size as a pointer. --- examples/nq/run_func.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/nq/run_func.c') diff --git a/examples/nq/run_func.c b/examples/nq/run_func.c index efb3bde..8d31e1f 100644 --- a/examples/nq/run_func.c +++ b/examples/nq/run_func.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -32,7 +33,7 @@ typedef struct list { if (arity == n) cast_apply_f(n) void *run_func(void *f, void *v, void *as) { - int arity = (int) v; + int arity = (uintptr_t) v; list *l = (list *) as; void repeat_n_32(*arg_); -- cgit v1.2.1