stat: Change access to io_sample union
authorSitsofe Wheeler <sitsofe@yahoo.com>
Sun, 27 Nov 2016 17:07:10 +0000 (17:07 +0000)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Sun, 27 Nov 2016 21:40:26 +0000 (21:40 +0000)
commitaf2fde1961fe6847b7f3dbbc74aa46ec09d0e129
treed5953a98f11d0e1240c2f75ba5cd4d6b9b22710d
parentfc8d6d050a22662f445954303953d81e500496aa
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 <sitsofe@yahoo.com>
client.c
eta.c
iolog.c
iolog.h
server.c
stat.c
stat.h