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

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



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


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