diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/nq/Makefile | 2 | ||||
| -rw-r--r-- | examples/nq/glue.c | 4 | ||||
| -rw-r--r-- | examples/nq/run_func.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/nq/Makefile b/examples/nq/Makefile index a2ad100..60b2d94 100644 --- a/examples/nq/Makefile +++ b/examples/nq/Makefile @@ -9,7 +9,7 @@ LDFLAGS = $(DEBUG) -L$(HOME)/usr/lib LDLIBS = -lgc LLCFLAGS = $(DEBUG) -Werror -Wpedantic -Wall -SINCFLAGS = -v +SINCFLAGS = -u always TRGT = nqueens diff --git a/examples/nq/glue.c b/examples/nq/glue.c index 5d8c6f0..07dfae7 100644 --- a/examples/nq/glue.c +++ b/examples/nq/glue.c @@ -34,8 +34,8 @@ int main(int argc, char **argv) { printf("usage: %s n\n", argv[0]); } else { - int n = atoi(argv[1]); - int n_solns = *((int *) count_solns(&n)); + uintptr_t n = atoi(argv[1]); + int n_solns = (int) count_solns((void *) n); printf("%i solutions found\n", n_solns); } diff --git a/examples/nq/run_func.c b/examples/nq/run_func.c index 7ee0652..1442ecb 100644 --- a/examples/nq/run_func.c +++ b/examples/nq/run_func.c @@ -32,7 +32,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 = (int) v; list *l = (list *) as; void repeat_n_32(*arg_); @@ -74,6 +74,6 @@ void *run_func(void *f, void *v, void *as) { } void *inter_assert(void *a, void *b) { - assert(*((int *) a)); + assert(a); return b; } |
