/* Find target field class having this name in current context */
for (si = ctx->cur_path->len - 1; si >= 0; si--) {
struct fs_sink_ctf_field_class *fc;
- struct fs_sink_ctf_field_class_struct *struct_fc;
- struct fs_sink_ctf_field_class_variant *var_fc;
+ struct fs_sink_ctf_field_class_struct *struct_fc = NULL;
+ struct fs_sink_ctf_field_class_variant *var_fc = NULL;
struct fs_sink_ctf_named_field_class *named_fc;
uint64_t len;
return 0;
}
+static inline
+int translate_bit_array_field_class(struct ctx *ctx)
+{
+ struct fs_sink_ctf_field_class_bit_array *fc =
+ fs_sink_ctf_field_class_bit_array_create(
+ cur_path_stack_top(ctx)->ir_fc,
+ cur_path_stack_top(ctx)->index_in_parent);
+
+ BT_ASSERT(fc);
+ append_to_parent_field_class(ctx, (void *) fc);
+ return 0;
+}
+
static inline
int translate_integer_field_class(struct ctx *ctx)
{
case BT_FIELD_CLASS_TYPE_BOOL:
ret = translate_bool_field_class(ctx);
break;
+ case BT_FIELD_CLASS_TYPE_BIT_ARRAY:
+ ret = translate_bit_array_field_class(ctx);
+ break;
case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER:
case BT_FIELD_CLASS_TYPE_SIGNED_INTEGER:
case BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION:
{
uint64_t i;
uint64_t len;
- struct fs_sink_ctf_field_class_struct *struct_fc;
+ struct fs_sink_ctf_field_class_struct *struct_fc = NULL;
struct fs_sink_ctf_field_class_variant *var_fc = NULL;
struct fs_sink_ctf_named_field_class *named_fc;