ctf: fix -Wformat-overflow error in ctf-meta-resolve.cpp
[babeltrace.git] / src / plugins / ctf / common / metadata / ctf-meta-resolve.c
index 074c5dd13d431942d44a49b6bfb46827d7b7773e..5233ef64562a890670d9ecfd5a6cfd8b686f313e 100644 (file)
@@ -240,7 +240,7 @@ struct ctf_field_class *borrow_class_from_ctx(struct resolve_context *ctx,
        case CTF_SCOPE_EVENT_PAYLOAD:
                return ctx->scopes.event_payload;
        default:
-               abort();
+               bt_common_abort();
        }
 
        return NULL;
@@ -520,7 +520,7 @@ int absolute_ptokens_to_field_path(GList *ptokens,
                break;
 
        default:
-               abort();
+               bt_common_abort();
        }
 
        /* Skip absolute path tokens */
@@ -681,7 +681,7 @@ int pathstr_to_field_path(const char *pathstr,
        if (BT_LOG_ON_TRACE && ret == 0) {
                GString *field_path_pretty = ctf_field_path_string(field_path);
                const char *field_path_pretty_str =
-                       field_path_pretty ? field_path_pretty->str : NULL;
+                       field_path_pretty ? field_path_pretty->str : "(null)";
 
                BT_COMP_LOGD("Found field path: path=\"%s\", field-path=\"%s\"",
                        pathstr, field_path_pretty_str);
@@ -774,9 +774,9 @@ int64_t get_field_paths_lca_index(struct ctf_field_path *field_path1,
                GString *field_path2_pretty =
                        ctf_field_path_string(field_path2);
                const char *field_path1_pretty_str =
-                       field_path1_pretty ? field_path1_pretty->str : NULL;
+                       field_path1_pretty ? field_path1_pretty->str : "(null)";
                const char *field_path2_pretty_str =
-                       field_path2_pretty ? field_path2_pretty->str : NULL;
+                       field_path2_pretty ? field_path2_pretty->str : "(null)";
 
                BT_COMP_LOGD("Finding lowest common ancestor (LCA) between two field paths: "
                        "field-path-1=\"%s\", field-path-2=\"%s\"",
@@ -944,7 +944,7 @@ int validate_target_field_path(struct ctf_field_path *target_field_path,
                break;
        }
        default:
-               abort();
+               bt_common_abort();
        }
 
 end:
@@ -983,7 +983,7 @@ int resolve_sequence_or_variant_field_class(struct ctf_field_class *fc,
                break;
        }
        default:
-               abort();
+               bt_common_abort();
        }
 
        if (!pathstr) {
@@ -1046,7 +1046,7 @@ int resolve_sequence_or_variant_field_class(struct ctf_field_class *fc,
                break;
        }
        default:
-               abort();
+               bt_common_abort();
        }
 
 end:
This page took 0.03538 seconds and 4 git commands to generate.