2009/2/5 Christoph von Wittich <Christoph(a)apiviewer.de>:
--- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -327,7 +327,12 @@ static void gen_proxy(type_t *iface, const var_t *func, int idx, if (has_ret) { print_proxy( "" ); write_type_decl_left(proxy, type_function_get_rettype(func->type)); - print_proxy( " _RetVal;\n"); + + /* Initialize _RetVal properly in order to avoid compiler warnings */ + if (is_ptr(type_function_get_rettype(func->type)) || is_array(type_function_get_rettype(func->type))) + print_proxy(" _RetVal = NULL;\n"); + else + print_proxy(" _RetVal = 0;\n"); } print_proxy( "RPC_MESSAGE _RpcMessage;\n" ); if (has_ret) {
I think this is just hiding the problem. Can you give an example of IDL which causes widl to generate code that causes compiler warnings? -- Rob Shearman