ir: attributes: fix index and count integer types
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 11 May 2017 05:11:41 +0000 (01:11 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:42 +0000 (12:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/ctf-ir/attributes-internal.h
lib/ctf-ir/attributes.c

index fc82e7296e78812ef8e7a75accb8ac0e97876508..359e75ed4d190a7b785b200b7843c9e9cdf88740 100644 (file)
@@ -32,6 +32,7 @@
 extern "C" {
 #endif
 
+#include <stdint.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/values.h>
 
@@ -46,11 +47,11 @@ int64_t bt_ctf_attributes_get_count(struct bt_value *attr_obj);
 
 BT_HIDDEN
 const char *bt_ctf_attributes_get_field_name(struct bt_value *attr_obj,
-               int index);
+               uint64_t index);
 
 BT_HIDDEN
 struct bt_value *bt_ctf_attributes_get_field_value(struct bt_value *attr_obj,
-               int index);
+               uint64_t index);
 
 BT_HIDDEN
 int bt_ctf_attributes_set_field_value(struct bt_value *attr_obj,
index 0ea3cfd7cc5a4e32ca05b37d8c0701caf5f709b7..b354951090de8fd0318bee31e23cfa1717258751 100644 (file)
@@ -65,7 +65,7 @@ int64_t bt_ctf_attributes_get_count(struct bt_value *attr_obj)
 
 BT_HIDDEN
 const char *bt_ctf_attributes_get_field_name(struct bt_value *attr_obj,
-               int index)
+               uint64_t index)
 {
        int rc;
        const char *ret = NULL;
@@ -103,7 +103,7 @@ end:
 
 BT_HIDDEN
 struct bt_value *bt_ctf_attributes_get_field_value(struct bt_value *attr_obj,
-               int index)
+               uint64_t index)
 {
        struct bt_value *value_obj = NULL;
        struct bt_value *attr_field_obj = NULL;
@@ -130,8 +130,8 @@ static
 struct bt_value *bt_ctf_attributes_get_field_by_name(
                struct bt_value *attr_obj, const char *name)
 {
-       int i;
-       int attr_size;
+       uint64_t i;
+       int64_t attr_size;
        struct bt_value *value_obj = NULL;
        struct bt_value *attr_field_name_obj = NULL;
 
@@ -251,8 +251,8 @@ end:
 BT_HIDDEN
 int bt_ctf_attributes_freeze(struct bt_value *attr_obj)
 {
-       int i;
-       int count;
+       uint64_t i;
+       int64_t count;
        int ret = 0;
 
        if (!attr_obj) {
This page took 0.026228 seconds and 4 git commands to generate.