diff options
author | Puthikorn Voravootivat <puthik@chromium.org> | 2014-06-24 15:59:53 -0700 |
---|---|---|
committer | Mohamad Ayyash <mkayyash@google.com> | 2015-03-06 17:57:09 -0800 |
commit | 834bbdb7632b37c4957ec112650afa399b9a4c2d (patch) | |
tree | 27069f4d3d6ba4decebdfcc85f175a06408b4328 /json.h | |
parent | be31cc9e0e6d580c2386bf508264e5a6ef76eb04 (diff) | |
download | fio-834bbdb7632b37c4957ec112650afa399b9a4c2d.tar.gz |
Cast input argument for json_object_add_value_int to long long
The latency related (and some other) variables type is uint32_t
but the JSON integer type is long long. So we need to cast
the numbers to long long type to make JSON output correctly.
Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'json.h')
-rw-r--r-- | json.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -52,7 +52,7 @@ void json_free_object(struct json_object *obj); int json_object_add_value_type(struct json_object *obj, const char *name, int type, ...); #define json_object_add_value_int(obj, name, val) \ - json_object_add_value_type((obj), name, JSON_TYPE_INTEGER, (val)) + json_object_add_value_type((obj), name, JSON_TYPE_INTEGER, (long long) (val)) #define json_object_add_value_float(obj, name, val) \ json_object_add_value_type((obj), name, JSON_TYPE_FLOAT, (val)) #define json_object_add_value_string(obj, name, val) \ |