Fix compiler warnings
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 25 Nov 2016 22:33:39 +0000 (17:33 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 18:09:07 +0000 (14:09 -0400)
Left one FIXME about unused function.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
converter/babeltrace-cfg.c
lib/plugin-system/iterator.c
plugins/ctf/common/notif-iter/notif-iter.c
plugins/text/print.c

index 6094b127ad5e62143107ab29e0257d9c1822ed74..a2b2ac4f8968c80f135e4807b5d696a95bd9fe77 100644 (file)
@@ -2300,8 +2300,8 @@ struct bt_config *bt_config_from_args(int argc, char *argv[], int *exit_code)
        struct bt_config *cfg = NULL;
        poptContext pc = NULL;
        char *arg = NULL;
-       struct ctf_legacy_opts ctf_legacy_opts = { 0 };
-       struct text_legacy_opts text_legacy_opts = { 0 };
+       struct ctf_legacy_opts ctf_legacy_opts;
+       struct text_legacy_opts text_legacy_opts;
        enum legacy_input_format legacy_input_format = LEGACY_INPUT_FORMAT_NONE;
        enum legacy_output_format legacy_output_format =
                LEGACY_OUTPUT_FORMAT_NONE;
@@ -2316,6 +2316,8 @@ struct bt_config *bt_config_from_args(int argc, char *argv[], int *exit_code)
        bool cur_cfg_comp_params_set = false;
        unsigned int i;
 
+       memset(&ctf_legacy_opts, 0, sizeof(ctf_legacy_opts));
+       memset(&text_legacy_opts, 0, sizeof(text_legacy_opts));
        *exit_code = 0;
 
        if (argc <= 1) {
index a1629f90d9d9534c47d39938039fdcbe1f514fb2..71393d1265f57f619ec49c2fb74b927c0c18f8b6 100644 (file)
@@ -188,7 +188,7 @@ enum bt_notification_iterator_status bt_notification_iterator_seek_time(
                enum bt_notification_iterator_seek_origin seek_origin,
                int64_t time)
 {
-       enum bt_notification_iterator_status ret = BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED;
-end:
+       enum bt_notification_iterator_status ret =
+                       BT_NOTIFICATION_ITERATOR_STATUS_UNSUPPORTED;
        return ret;
 }
index 6411dd1f20c6626132ee007061ca530c069e35f1..692ed6a93bae231a4089f67a81001450d03c4cfb 100644 (file)
@@ -40,6 +40,7 @@
 #include <babeltrace/ctf-ir/event-class.h>
 #include <babeltrace/plugin/notification/packet.h>
 #include <babeltrace/plugin/notification/event.h>
+#include <babeltrace/plugin/notification/stream.h>
 #include <babeltrace/ref.h>
 #include <glib.h>
 
@@ -1942,26 +1943,28 @@ end:
        BT_PUT(event);
 }
 
+//FIXME: not used ?
 static
 void notify_eos(struct bt_ctf_notif_iter *notit,
                struct bt_notification **notification)
 {
-       struct bt_ctf_event *event;
+       struct bt_ctf_stream *stream = NULL;
        struct bt_notification *ret = NULL;
 
-       /* Create event */
-       event = create_event(notit);
-       if (!event) {
+       /* Ask the user for the stream */
+       stream = notit->medium.medops.get_stream(notit->meta.stream_class,
+                       notit->medium.data);
+       if (!stream) {
                goto end;
        }
 
-       ret = bt_notification_stream_end_create(event);
+       ret = bt_notification_stream_end_create(stream);
        if (!ret) {
                goto end;
        }
        *notification = ret;
 end:
-       BT_PUT(event);
+       BT_PUT(stream);
 }
 
 static
index bef5031442b17f5fa0d1723e9b7eb47ff203060f..df0bea5ef6cc8fd78e7be0dd9f2f82e387f37ebb 100644 (file)
@@ -209,8 +209,6 @@ enum bt_component_status print_event_timestamp(struct text_component *text,
        struct bt_ctf_trace *trace = NULL;
        struct bt_ctf_clock *clock = NULL;
        FILE *out = text->out;
-       FILE *err = text->err;
-       uint64_t real_timestamp;
 
        stream = bt_ctf_event_get_stream(event);
        if (!stream) {
This page took 0.029372 seconds and 4 git commands to generate.