From f2817f2e112d4088eeb7eed7225edf7a567e52a7 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Wed, 2 Oct 2019 14:25:49 -0400 Subject: [PATCH] fs-sink-trace.c: lttng_validate_datetime(): ignore deprecated decl. Disable `deprecated-declarations` compiler 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). Signed-off-by: Philippe Proulx Change-Id: I4da3bda550b3fd7d7ede13ff3b78ec78ad6f7839 Reviewed-on: https://review.lttng.org/c/babeltrace/+/2121 Tested-by: jenkins Reviewed-by: Francis Deslauriers --- src/plugins/ctf/fs-sink/fs-sink-trace.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/plugins/ctf/fs-sink/fs-sink-trace.c b/src/plugins/ctf/fs-sink/fs-sink-trace.c index 16d9241a..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) -- 2.34.1