[DRAFT PATCHv5 9/9] rpc: removes the removal of unused variable i

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



the removal of unused variable i also removes codes like
this:

if (!xdr_int (xdrs, &objp->remote_typed_param_value_u.i))

which should not be removed.

Sorry I'm not familiar with perl and can't find a perfect way
to deal with this.

---
 src/rpc/genprotocol.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl
index 7af1b3b..cec93d8 100755
--- a/src/rpc/genprotocol.pl
+++ b/src/rpc/genprotocol.pl
@@ -72,7 +72,7 @@ while (<RPCGEN>) {
 
 	# Remove decl of i, if i isn't used in the function.
 	@uses = grep /\bi\b/, @function;
-	@function = grep !/\bi\b/, @function if @uses == 1;
+        #@function = grep !/\bi\b/, @function if @uses == 1;
 
 	# (char **)&objp->... gives:
 	# warning: dereferencing type-punned pointer will break
-- 
1.7.4.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]