r4076: fix compiler warning
authorStefan Metzmacher <metze@samba.org>
Mon, 6 Dec 2004 15:10:31 +0000 (15:10 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:06:23 +0000 (13:06 -0500)
metze
(This used to be commit 2647b47557c880dd5f24a4cd15475badfd7fdc94)

source4/build/pidl/stub.pm

index a9843e106e4d1581142d16a91f776ede6f0ba4db..fde239219ffb42f9ba519370ff421165ccffaa76 100644 (file)
@@ -27,7 +27,9 @@ sub gen_dispatch_switch($)
                next if ($d->{TYPE} ne "FUNCTION");
 
                pidl "\tcase $count: {\n";
-               pidl "\t\tNTSTATUS result;\n";
+               if ($d->{RETURN_TYPE} && $d->{RETURN_TYPE} ne "void") {
+                       pidl "\t\tNTSTATUS result;\n";
+               }
                pidl "\t\tstruct $d->{NAME} *r2 = r;\n";
                pidl "\t\tif (DEBUGLEVEL > 10) {\n";
                pidl "\t\t\tNDR_PRINT_FUNCTION_DEBUG($d->{NAME}, NDR_IN, r2);\n";