]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Fix warning for source_funcs parameter of g_source_new() 17c74db533ad103a15f14e39a81e81883990d2a8
authorAlistair Thomas <astavale@yahoo.co.uk>
Sat, 16 Jun 2018 18:26:14 +0000 (19:26 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 18 Jun 2018 09:37:02 +0000 (11:37 +0200)
codegen/valaccodemethodcallmodule.vala

index efa067a9ab26fc5217392e504b50efe054eaba21..56e19e412a7d2ca738cd5593ab88b766d6976e24 100644 (file)
@@ -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)));