if (!bt_value_compare(element_obj_a, element_obj_b)) {
BT_LOGV("Array values's elements are different: "
"value-a-addr=%p, value-b-addr=%p, index=%d",
- element_obj_a, element_obj_b, index);
+ element_obj_a, element_obj_b, i);
BT_PUT(element_obj_a);
BT_PUT(element_obj_b);
ret = BT_FALSE;
enum bt_value_type bt_value_get_type(const struct bt_value *object)
{
if (!object) {
- BT_LOGW_STR("Invalid parameter: value object is NULL.");
+ /*
+ * Not an error: user can test NULL value object with
+ * this function.
+ */
+ BT_LOGV_STR("Value object is NULL.");
return BT_VALUE_TYPE_UNKNOWN;
}
goto end;
}
- BT_LOGD("Creating string value object: val-len=%u", strlen(val));
+ BT_LOGD("Creating string value object: val-len=%zu", strlen(val));
string_obj = g_new0(struct bt_value_string, 1);
if (!string_obj) {
if (!bt_value_is_bool(bool_obj)) {
BT_LOGW("Invalid parameter: value is not a boolean value: addr=%p, "
- "type=%s", bool_obj, bool_obj->type,
+ "type=%s", bool_obj,
bt_value_type_string(bool_obj->type));
ret = BT_VALUE_STATUS_INVAL;
goto end;
if (bt_value_map_foreach(extension_obj, extend_map_element,
&extend_data)) {
- BT_LOGE("Cannot iterate on the extension object's elements: ",
+ BT_LOGE("Cannot iterate on the extension object's elements: "
"extension-value-addr=%p", extension_obj);
goto error;
}
if (extend_data.got_error) {
- BT_LOGE("Failed to successfully iterate on the extension object's elements: ",
+ BT_LOGE("Failed to successfully iterate on the extension object's elements: "
"extension-value-addr=%p", extension_obj);
goto error;
}