path: root/stat.h
diff options
authorSitsofe Wheeler <>2016-11-27 17:07:10 +0000
committerSitsofe Wheeler <>2016-11-27 21:40:26 +0000
commitaf2fde1961fe6847b7f3dbbc74aa46ec09d0e129 (patch)
treed5953a98f11d0e1240c2f75ba5cd4d6b9b22710d /stat.h
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 'stat.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/stat.h b/stat.h
index 7a25415a..75d1f4e6 100644
--- a/stat.h
+++ b/stat.h
@@ -281,7 +281,7 @@ extern void add_clat_sample(struct thread_data *, enum fio_ddir, unsigned long,
unsigned int, uint64_t);
extern void add_slat_sample(struct thread_data *, enum fio_ddir, unsigned long,
unsigned int, uint64_t);
-extern void add_agg_sample(unsigned long, enum fio_ddir, unsigned int);
+extern void add_agg_sample(union io_sample_data, enum fio_ddir, unsigned int);
extern void add_iops_sample(struct thread_data *, struct io_u *,
unsigned int);
extern void add_bw_sample(struct thread_data *, struct io_u *,