From: Alistair Thomas Date: Sat, 16 Jun 2018 18:26:14 +0000 (+0100) Subject: codegen: Fix warning for source_funcs parameter of g_source_new() X-Git-Tag: 0.41.90~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17c74db533ad103a15f14e39a81e81883990d2a8;p=thirdparty%2Fvala.git codegen: Fix warning for source_funcs parameter of g_source_new() --- diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala index efa067a9a..56e19e412 100644 --- a/codegen/valaccodemethodcallmodule.vala +++ b/codegen/valaccodemethodcallmodule.vala @@ -177,7 +177,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule { funcs.add_declarator (new CCodeVariableDeclarator ("_source_funcs", new CCodeConstant ("{ %s_real_prepare, %s_real_check, %s_real_dispatch, %s_finalize}".printf (class_prefix, class_prefix, class_prefix, class_prefix)))); ccode.add_statement (funcs); - ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("_source_funcs"))); + ccall.add_argument (new CCodeCastExpression (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("_source_funcs")), "GSourceFuncs *")); var csizeof = new CCodeFunctionCall (new CCodeIdentifier ("sizeof")); csizeof.add_argument (new CCodeIdentifier (get_ccode_name (current_class)));