From a572bbfb6a85b03e459a56616c2e95e497e005e8 Mon Sep 17 00:00:00 2001 From: Aaron Carroll Date: Fri, 12 Apr 2013 07:55:02 +0200 Subject: [PATCH] server: fix 32-bit build warning Cast the 64-bit tag to a 32-bit pointer first, before casting to the fio_net_cmd_reply pointer. Signed-off-by: Jens Axboe --- server.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server.c b/server.c index 9537c967..8a6275de 100644 --- a/server.c +++ b/server.c @@ -293,8 +293,9 @@ struct fio_net_cmd *fio_net_recv_cmd(int sk) static void add_reply(uint64_t tag, struct flist_head *list) { - struct fio_net_cmd_reply *reply = (struct fio_net_cmd_reply *) tag; + struct fio_net_cmd_reply *reply; + reply = (struct fio_net_cmd_reply *) (uintptr_t) tag; flist_add_tail(&reply->list, list); } @@ -313,8 +314,9 @@ static uint64_t alloc_reply(uint64_t tag, uint16_t opcode) static void free_reply(uint64_t tag) { - struct fio_net_cmd_reply *reply = (struct fio_net_cmd_reply *) tag; + struct fio_net_cmd_reply *reply; + reply = (struct fio_net_cmd_reply *) (uintptr_t) tag; free(reply); } -- 2.25.1