lib: add option field classes with integer selectors
[babeltrace.git] / src / plugins / ctf / fs-sink / translate-trace-ir-to-ctf-ir.c
index 535325d1e8c84b5821b2798022ac812bc4b0571f..1b0e8e7a3c5de3f8f1f4105a3dff3f2e18116cf8 100644 (file)
@@ -370,8 +370,8 @@ int create_relative_field_ref(struct ctx *ctx,
        /* 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;
 
@@ -1318,7 +1318,8 @@ int translate_field_class(struct ctx *ctx)
        case BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION:
                ret = translate_integer_field_class(ctx);
                break;
-       case BT_FIELD_CLASS_TYPE_REAL:
+       case BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL:
+       case BT_FIELD_CLASS_TYPE_DOUBLE_PRECISION_REAL:
                ret = translate_real_field_class(ctx);
                break;
        case BT_FIELD_CLASS_TYPE_STRING:
@@ -1333,7 +1334,10 @@ int translate_field_class(struct ctx *ctx)
        case BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY:
                ret = translate_dynamic_array_field_class(ctx);
                break;
-       case BT_FIELD_CLASS_TYPE_OPTION:
+       case BT_FIELD_CLASS_TYPE_OPTION_WITHOUT_SELECTOR:
+       case BT_FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR:
+       case BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR:
+       case BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR:
                ret = translate_option_field_class(ctx);
                break;
        case BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR:
@@ -1501,7 +1505,7 @@ int set_field_refs(struct fs_sink_ctf_field_class * const fc,
        {
                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;
 
This page took 0.030153 seconds and 4 git commands to generate.