summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2012-07-10 09:33:02 -0400
committerAnand Avati <avati@redhat.com>2012-07-12 00:31:47 -0700
commit08745892b4edd34296bfa5f2f4967329515346fb (patch)
treecfd16d52302b31aad2c9ce669fcb56dae1a3d9b3 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parentc76b49047aa396c0296a6ba2120e14abc0d27491 (diff)
calls to dict_allocate_and_serialize() are not 64-bit clean
All calls to dict_allocate_and_serialize() pass the address of a 32-bit type, but must cast it to the 64-bit pointer type (size_t *). This happens to work on LE machines, but even if it's apparently benign, it's still a bug. On BE machines it is not benign. GF_PROTOCOL_DICT_SERIALIZE() hacks around it by creating a size_t temp var, but that's, well, a hack, IMO when you consider that all the callers are actually passing &<u_int>; the param should just be a u_int * and eliminate the buggy casts and the temp var in the macro. Nobody apparently uses the Fedora/EPEL PPC RPMs, but they might. People are trying to build gluster.org bits on SPARC and tripping over this. Change-Id: I92ea139f9e3e91ddbbb32a51b96fa582a9515626 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> BUG: 838928 Reviewed-on: http://review.gluster.com/3642 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index d0e8882fb7a..afe1efd479a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -233,7 +233,7 @@ glusterd_brick_op_build_payload (glusterd_op_t op, glusterd_brickinfo_t *brickin
}
ret = dict_allocate_and_serialize (dict, &brick_req->input.input_val,
- (size_t*)&brick_req->input.input_len);
+ &brick_req->input.input_len);
if (ret)
goto out;
*req = brick_req;
@@ -285,7 +285,7 @@ glusterd_node_op_build_payload (glusterd_op_t op, gd1_mgmt_brick_op_req **req,
}
ret = dict_allocate_and_serialize (dict, &brick_req->input.input_val,
- (size_t*)&brick_req->input.input_len);
+ &brick_req->input.input_len);
if (ret)
goto out;