summaryrefslogtreecommitdiff
path: root/json.h
diff options
context:
space:
mode:
authorPuthikorn Voravootivat <puthik@chromium.org>2014-06-24 15:59:53 -0700
committerJens Axboe <axboe@fb.com>2014-06-24 19:31:22 -0600
commita606a802173272002e37be6475802be8c37481d6 (patch)
tree3474fa7336eb53fa1f9b4409479735b820322d33 /json.h
parent31538d8744bba70f29623c547a2dbab3a1dcdd9a (diff)
downloadfio-a606a802173272002e37be6475802be8c37481d6.tar.gz
fio-a606a802173272002e37be6475802be8c37481d6.tar.bz2
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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/json.h b/json.h
index 081afd6c..962c11c2 100644
--- a/json.h
+++ b/json.h
@@ -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) \