]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
D-Bus: Fix C warnings when using file descriptor passing with GDBus
authorJürg Billeter <j@bitron.ch>
Mon, 25 Oct 2010 08:20:11 +0000 (10:20 +0200)
committerJürg Billeter <j@bitron.ch>
Mon, 25 Oct 2010 08:20:11 +0000 (10:20 +0200)
codegen/valagdbusmodule.vala

index 6667771667e126069cd6e14c2ef2a4dc8901836a..44f61e81db97525ab498986be5115267febaf887 100644 (file)
@@ -183,12 +183,12 @@ public class Vala.GDBusModule : GVariantModule {
                                var result = new CCodeFunctionCall (new CCodeIdentifier ("g_unix_input_stream_new"));
                                result.add_argument (expr);
                                result.add_argument (new CCodeConstant ("TRUE"));
-                               return result;
+                               return new CCodeCastExpression (result, "GUnixInputStream *");
                        } else if (type.data_type.get_full_name () == "GLib.UnixOutputStream") {
                                var result = new CCodeFunctionCall (new CCodeIdentifier ("g_unix_output_stream_new"));
                                result.add_argument (expr);
                                result.add_argument (new CCodeConstant ("TRUE"));
-                               return result;
+                               return new CCodeCastExpression (result, "GUnixOutputStream *");
                        } else if (type.data_type.get_full_name () == "GLib.Socket") {
                                var result = new CCodeFunctionCall (new CCodeIdentifier ("g_socket_new_from_fd"));
                                result.add_argument (expr);