sink.ctf.fs: initialize structure fields
[babeltrace.git] / src / plugins / ctf / fs-sink / fs-sink-trace.hpp
index 0da8b4b04955b2abd7df0f3216fd3009ae114b51..a85966ca84ee53d7b78f16bd580465d4acbc3b9e 100644 (file)
 
 #include <babeltrace2/babeltrace.h>
 
+struct fs_sink_comp;
+struct fs_sink_ctf_trace;
+
 struct fs_sink_trace
 {
-    bt_logging_level log_level;
-    struct fs_sink_comp *fs_sink;
+    bt_logging_level log_level = BT_LOGGING_LEVEL_NONE;
+    fs_sink_comp *fs_sink = nullptr;
 
     /* Owned by this */
-    struct fs_sink_ctf_trace *trace;
+    fs_sink_ctf_trace *trace = nullptr;
 
     /*
      * Weak reference: this object does not own it, and `trace`
@@ -31,21 +34,21 @@ struct fs_sink_trace
      * could "leak" resources (memory, file descriptors) associated
      * to traces and streams which otherwise would not exist.
      */
-    const bt_trace *ir_trace;
+    const bt_trace *ir_trace = nullptr;
 
-    bt_listener_id ir_trace_destruction_listener_id;
+    bt_listener_id ir_trace_destruction_listener_id = 0;
 
     /* Trace's directory */
-    GString *path;
+    GString *path = nullptr;
 
     /* `metadata` file path */
-    GString *metadata_path;
+    GString *metadata_path = nullptr;
 
     /*
      * Hash table of `const bt_stream *` (weak) to
      * `struct fs_sink_stream *` (owned by hash table).
      */
-    GHashTable *streams;
+    GHashTable *streams = nullptr;
 };
 
 struct fs_sink_trace *fs_sink_trace_create(struct fs_sink_comp *fs_sink, const bt_trace *ir_trace);
This page took 0.031426 seconds and 4 git commands to generate.