From 1d1098f63809770f2cb415ececba89f737c6e890 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 22 Jun 2020 13:22:40 +0200 Subject: [PATCH] libnm: avoid deprecation warning about NMUtilsPredicateStr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NMUtilsPredicateStr got introduced in 1.26.0 API. However, marking the typedef to be available only in 1.26, causes a compiler warning when using the header: /usr/include/libnm/nm-setting.h:372:39: error: ‘NMUtilsPredicateStr’ is deprecated: Not available before 1.26 [-Werror=deprecated-declarations] 372 | NMUtilsPredicateStr predicate); | ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Avoid that. It's not a problem in practice, because all users of the typedef are functions that are marked to be available in 1.26 themselves. (cherry picked from commit 8a13b02d9642c4f8208c6ee0078a28d6127d84d4) --- libnm-core/nm-core-types.h | 1 - 1 file changed, 1 deletion(-) diff --git a/libnm-core/nm-core-types.h b/libnm-core/nm-core-types.h index ce59ec036e..0237e67625 100644 --- a/libnm-core/nm-core-types.h +++ b/libnm-core/nm-core-types.h @@ -65,7 +65,6 @@ typedef struct _NMSettingWirelessSecurity NMSettingWirelessSecurity; typedef struct _NMSettingWpan NMSettingWpan; typedef struct _NMSimpleConnection NMSimpleConnection; -NM_AVAILABLE_IN_1_26 typedef gboolean (*NMUtilsPredicateStr) (const char *str); #endif /* __NM_CORE_TYPES_H__ */