From 1af34e1746e9736ea725502562ca21f7e12f3b34 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 13 Dec 2022 18:20:15 +0100 Subject: libmm-glib,common-helpers: undeprecate g_date_time_format_iso8601() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid a deprecation warning with too new glib: ../libmm-glib/mm-common-helpers.c: In function ‘date_time_format_iso8601’: ../libmm-glib/mm-common-helpers.c:1729:5: warning: ‘g_date_time_format_iso8601’ is deprecated: Not available before 2.62 [-Wdeprecated-declarations] 1729 | return g_date_time_format_iso8601 (dt); | ^~~~~~ This call site is protected by version guards and provides an alternative implementation in date_time_format_iso8601(). --- libmm-glib/mm-common-helpers.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmm-glib') diff --git a/libmm-glib/mm-common-helpers.c b/libmm-glib/mm-common-helpers.c index b57cb205..ac75abcf 100644 --- a/libmm-glib/mm-common-helpers.c +++ b/libmm-glib/mm-common-helpers.c @@ -1726,7 +1726,9 @@ static gchar * date_time_format_iso8601 (GDateTime *dt) { #if GLIB_CHECK_VERSION (2, 62, 0) + G_GNUC_BEGIN_IGNORE_DEPRECATIONS return g_date_time_format_iso8601 (dt); + G_GNUC_END_IGNORE_DEPRECATIONS #else GString *outstr = NULL; g_autofree gchar *main_date = NULL; -- cgit v1.2.3-70-g09d2