path: root/server.c
diff options
authorSitsofe Wheeler <>2016-11-27 17:07:10 +0000
committerSitsofe Wheeler <>2016-11-27 21:40:26 +0000
commitaf2fde1961fe6847b7f3dbbc74aa46ec09d0e129 (patch)
treed5953a98f11d0e1240c2f75ba5cd4d6b9b22710d /server.c
parentfc8d6d050a22662f445954303953d81e500496aa (diff)
stat: Change access to io_sample union
Compiling on certain platforms produces warnings like stat.c: In function ‘add_clat_sample’: stat.c:2241:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] because the size of a pointer is different to that of a long. Work around this by explicitly naming the union used in io_sample, forcing the "val" in the union to be a uint64_t, changing function parameters to accept a union (rather than an unsigned long) and adding helper functions to wrap values into a union. Signed-off-by: Sitsofe Wheeler <>
Diffstat (limited to 'server.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/server.c b/server.c
index c520b6bb..ab3e7cf2 100644
--- a/server.c
+++ b/server.c
@@ -1730,7 +1730,7 @@ static int __fio_append_iolog_gz_hist(struct sk_entry *first, struct io_log *log
/* Do the subtraction on server side so that client doesn't have to
* reconstruct our linked list from packets.
- cur_plat_entry = s->plat_entry;
+ cur_plat_entry = s->data.plat_entry;
prev_plat_entry = flist_first_entry(&cur_plat_entry->list, struct io_u_plat_entry, list);
cur_plat = cur_plat_entry->io_u_plat;
prev_plat = prev_plat_entry->io_u_plat;
@@ -1934,7 +1934,7 @@ int fio_send_iolog(struct thread_data *td, struct io_log *log, const char *name)
struct io_sample *s = get_sample(log, cur_log, i);
s->time = cpu_to_le64(s->time);
- s->val = cpu_to_le64(s->val);
+ s->data.val = cpu_to_le64(s->data.val);
s->__ddir = cpu_to_le32(s->__ddir);
s->bs = cpu_to_le32(s->bs);