[ros-diffs] [ekohl] 37001: Initialize _RetVal properly in order to avoid compiler warnings.
ekohl at svn.reactos.org
ekohl at svn.reactos.org
Sun Oct 26 22:03:12 CET 2008
Author: ekohl
Date: Sun Oct 26 16:03:11 2008
New Revision: 37001
URL: http://svn.reactos.org/svn/reactos?rev=37001&view=rev
Log:
Initialize _RetVal properly in order to avoid compiler warnings.
Modified:
trunk/reactos/tools/widl/proxy.c
Modified: trunk/reactos/tools/widl/proxy.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/proxy.c?rev=37001&r1=37000&r2=37001&view=diff
==============================================================================
--- trunk/reactos/tools/widl/proxy.c [iso-8859-1] (original)
+++ trunk/reactos/tools/widl/proxy.c [iso-8859-1] Sun Oct 26 16:03:11 2008
@@ -267,7 +267,12 @@
if (has_ret) {
print_proxy( "" );
write_type_decl_left(proxy, get_func_return_type(cur));
- print_proxy( " _RetVal;\n");
+
+ /* Initialize _RetVal properly in order to avoid compiler warnings */
+ if (is_ptr(get_func_return_type(cur)) || is_array(get_func_return_type(cur)))
+ print_proxy(" _RetVal = NULL;\n");
+ else
+ print_proxy(" _RetVal = 0;\n");
}
print_proxy( "RPC_MESSAGE _RpcMessage;\n" );
print_proxy( "MIDL_STUB_MESSAGE _StubMsg;\n" );
More information about the Ros-diffs
mailing list