From 8a9f2a6bbd6bdf164ca987edac34ac72447881a5 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 15 Feb 2019 01:57:51 +0000 Subject: compiler, runtime: harmonize types referenced by both C and Go Compiling with LTO revealed a number of cases in the runtime and standard library where C and Go disagreed about the type of an object or function (or where Go and code generated by the compiler disagreed). In all cases the underlying representation was the same (e.g., uintptr vs. void*), so this wasn't causing actual problems, but it did result in a number of annoying warnings when compiling with LTO. Reviewed-on: https://go-review.googlesource.com/c/160700 From-SVN: r268923 --- libgo/runtime/go-reflect-call.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libgo/runtime/go-reflect-call.c') diff --git a/libgo/runtime/go-reflect-call.c b/libgo/runtime/go-reflect-call.c index 6a9a7f3..abd598b 100644 --- a/libgo/runtime/go-reflect-call.c +++ b/libgo/runtime/go-reflect-call.c @@ -229,7 +229,8 @@ reflect_call (const struct __go_func_type *func_type, FuncVal *func_val, call_result = (unsigned char *) malloc (go_results_size (func_type)); - ffi_call_go (&cif, func_val->fn, call_result, params, func_val); + ffi_call_go (&cif, (void (*)(void)) func_val->fn, call_result, params, + func_val); /* Some day we may need to free result values if RESULTS is NULL. */ -- cgit v1.1