Fix: format string warnings on mingw
[babeltrace.git] / src / ctf-writer / stream-class.c
index 5346c530bdc5235baf4dcd3c3ea98670fd8723ea..2d3b2fbae70e51448d51304196a82e0eec19e56c 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 
-#include <babeltrace2/ctf-writer/event.h>
-#include <babeltrace2/ctf-writer/object.h>
-#include <babeltrace2/ctf-writer/trace.h>
-#include <babeltrace2/ctf-writer/utils.h>
+#include <babeltrace2-ctf-writer/event.h>
+#include <babeltrace2-ctf-writer/object.h>
+#include <babeltrace2-ctf-writer/trace.h>
+#include <babeltrace2-ctf-writer/utils.h>
 
 #include "common/align.h"
 #include "common/assert.h"
@@ -613,7 +613,7 @@ int init_packet_context(struct bt_ctf_stream_class *stream_class)
                bt_ctf_field_type_structure_create();
        struct bt_ctf_field_type *_uint64_t =
                get_field_type(FIELD_TYPE_ALIAS_UINT64_T);
-       struct bt_ctf_field_type *ts_begin_end_uint64_t;
+       struct bt_ctf_field_type *ts_begin_end_uint64_t = NULL;
 
        if (!packet_context_type) {
                BT_LOGE_STR("Cannot create empty structure field type.");
@@ -776,6 +776,8 @@ int try_map_clock_class(struct bt_ctf_stream_class *stream_class,
                if (!ft_copy) {
                        BT_LOGE("Failed to copy integer field type: ft-addr=%p",
                                ft);
+                       ret = -1;
+                       goto end;
                }
 
                ret = bt_ctf_field_type_common_integer_set_mapped_clock_class_no_check_frozen(
This page took 0.024413 seconds and 4 git commands to generate.