X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Ffs-sink%2Ffs-sink-trace.c;h=b64c62ed3fc2cb0076e1dd8184e09c7e6c2ca5b6;hb=05189245f61dcc2ae98aa58ef7a26b44c4904cda;hp=d629d00d82b27edad28bcb1e1fc0b9159f3cdd06;hpb=3526de3ef84c8d5723226a639c79412a6085d40c;p=babeltrace.git diff --git a/src/plugins/ctf/fs-sink/fs-sink-trace.c b/src/plugins/ctf/fs-sink/fs-sink-trace.c index d629d00d..b64c62ed 100644 --- a/src/plugins/ctf/fs-sink/fs-sink-trace.c +++ b/src/plugins/ctf/fs-sink/fs-sink-trace.c @@ -133,6 +133,15 @@ GString *make_unique_trace_path(const char *path) return unique_path; } +/* + * Disable `deprecated-declarations` warnings for + * lttng_validate_datetime() because we're using `GTimeVal` and + * g_time_val_from_iso8601() which are deprecated since GLib 2.56 + * (Babeltrace supports older versions too). + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + /* * Validate that the input string `datetime` is an ISO8601-compliant string (the * format used by LTTng in the metadata). @@ -162,6 +171,8 @@ end: return ret; } +#pragma GCC diagnostic pop + static int append_lttng_trace_path_ust_uid(const struct fs_sink_trace *trace, GString *path, const bt_trace *tc) @@ -545,9 +556,7 @@ void fs_sink_trace_destroy(struct fs_sink_trace *trace) trace->trace = NULL; g_free(trace); - if (tsdl) { - g_string_free(tsdl, TRUE); - } + g_string_free(tsdl, TRUE); end: return;