提交 c132e0f7 编写于 作者: R Richard W.M. Jones

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.
上级 9dc31e15
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
......
......@@ -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;
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册