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 <axboe@kernel.dk>
diff --git a/server.c b/server.c
index 9537c96..8a6275d 100644
--- a/server.c
+++ b/server.c
@@ -293,8 +293,9 @@
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 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);
}