]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix type-punning warning in remote code.
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 23 May 2008 07:59:00 +0000 (07:59 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 23 May 2008 07:59:00 +0000 (07:59 +0000)
* qemud/rpcgen_fix.pl: Case-insensitive string match on identifiers.
* qemud/remote_protocol.c: Update this generated file.

ChangeLog
qemud/remote_protocol.c
qemud/rpcgen_fix.pl

index 6cdd50f3f7423e04fb642b46959fae14845db49a..dd0abb82d2a32e6aa65792bf59564e4ac5a64985 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri May 23 08:54:00 BST 2008 Richard W.M. Jones <rjones@redhat.com>
+
+       Fix type-punning warning in remote code.
+       * qemud/rpcgen_fix.pl: Case-insensitive string match on identifiers.
+       * qemud/remote_protocol.c: Update this generated file.
+
 Thu May 22 19:47:29 EST 2008 Daniel P. Berrange <berrange@redhat.com>
 
        * src/qparams.c: Support ; as a param separator. Misc memory
index 702846f71ba840cb34b579408c55534281185cb2..e2eeaaea101c8dd4e48d94b72cdd18605dc38b20 100644 (file)
@@ -400,8 +400,9 @@ xdr_remote_node_get_cells_free_memory_args (XDR *xdrs, remote_node_get_cells_fre
 bool_t
 xdr_remote_node_get_cells_free_memory_ret (XDR *xdrs, remote_node_get_cells_free_memory_ret *objp)
 {
+        char **objp_cpp0 = (char **) (void *) &objp->freeMems.freeMems_val;
 
-         if (!xdr_array (xdrs, (char **)&objp->freeMems.freeMems_val, (u_int *) &objp->freeMems.freeMems_len, REMOTE_NODE_MAX_CELLS,
+         if (!xdr_array (xdrs, objp_cpp0, (u_int *) &objp->freeMems.freeMems_len, REMOTE_NODE_MAX_CELLS,
                 sizeof (quad_t), (xdrproc_t) xdr_quad_t))
                  return FALSE;
         return TRUE;
index b94547a7ef160931bc9b53e493badacdd3f8bb61..5b329e2ed00ec9b3a42b5fb906dc8b25bf041ce3 100644 (file)
@@ -46,7 +46,7 @@ while (<>) {
        my %uses = ();
        my $i = 0;
        foreach (@function) {
-           $uses{$1} = $i++ if m/\(char \*\*\)\&(objp->[a-z_.]+_val)/;
+           $uses{$1} = $i++ if m/\(char \*\*\)\&(objp->[a-z_.]+_val)/i;
        }
        if (keys %uses >= 1) {
            my $i = 1;
@@ -59,7 +59,7 @@ while (<>) {
            }
            @function =
                map { s{\(char \*\*\)\&(objp->[a-z_.]+_val)}
-                      {objp_cpp$uses{$1}}g; $_ } @function;
+                      {objp_cpp$uses{$1}}gi; $_ } @function;
        }
 
        # The code uses 'IXDR_PUT_{U_,}LONG' but it's wrong in two