From 28eb04c4dbf78cb9841aa3dc1c35ef66794f1c1e Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 13 Mar 2005 14:49:59 +0000 Subject: [PATCH] Fix gcc warnings in generated client stub. svn path=/trunk/; revision=14009 --- reactos/tools/widl/ChangeLog | 9 ++++++++- reactos/tools/widl/client.c | 13 +++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/reactos/tools/widl/ChangeLog b/reactos/tools/widl/ChangeLog index 0555b801d97..6ef9db9daaa 100644 --- a/reactos/tools/widl/ChangeLog +++ b/reactos/tools/widl/ChangeLog @@ -1,6 +1,13 @@ ChangeLog -2005-03-12 ekohl +2005-03-13 ekohl + + tools/widl/client.c + +Fix gcc warnings in generated client stub. + + +2005-03-13 ekohl tools/widl/client.c tools/widl/server.c diff --git a/reactos/tools/widl/client.c b/reactos/tools/widl/client.c index e10688368af..a0031551111 100644 --- a/reactos/tools/widl/client.c +++ b/reactos/tools/widl/client.c @@ -273,6 +273,8 @@ static void print_message_buffer_size(func_t *func) { size = 12; alignment = 0; + if (last_size != -1) + fprintf(client, " +"); fprintf(client, " %dU", (size == 0) ? 0 : size + alignment); nothing_printed = 0; } @@ -880,8 +882,11 @@ static void write_function_stubs(type_t *iface) static void write_bindinghandledecl(type_t *iface) { - print_client("static RPC_BINDING_HANDLE %s__MIDL_AutoBindHandle;\n", iface->name); - fprintf(client, "\n"); + if (!get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE)) + { + print_client("static RPC_BINDING_HANDLE %s__MIDL_AutoBindHandle;\n", iface->name); + fprintf(client, "\n"); + } } @@ -903,9 +908,9 @@ static void write_stubdescriptor(type_t *iface) print_client("MIDL_user_allocate,\n"); print_client("MIDL_user_free,\n"); if (implicit_handle) - print_client("&%s,\n", implicit_handle); + print_client("{&%s},\n", implicit_handle); else - print_client("&%s__MIDL_AutoBindHandle,\n", iface->name); + print_client("{&%s__MIDL_AutoBindHandle},\n", iface->name); print_client("0,\n"); print_client("0,\n"); print_client("0,\n");