#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/values.h>
#include <inttypes.h>
+#include <assert.h>
+#include <babeltrace/compat/string-internal.h>
#define BT_CTF_ATTR_NAME_INDEX 0
#define BT_CTF_ATTR_VALUE_INDEX 1
if (!attr_field_name_obj) {
BT_LOGE("Cannot get attribute array value's element by index: "
"value-addr=%p, index=%" PRIu64,
- value_obj, 0);
+ value_obj, (int64_t) 0);
goto error;
}
BT_LOGD("Freezing attributes object: value-addr=%p", attr_obj);
count = bt_value_array_size(attr_obj);
- if (count < 0) {
- BT_LOGE("Cannot get array value's size: value-addr=%p",
- attr_obj);
- ret = -1;
- goto end;
- }
+ assert(count >= 0);
/*
* We do not freeze the array value object itself here, since