summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-06-17 11:59:04 +0200
committerThomas Haller <thaller@redhat.com>2016-06-17 12:25:15 +0200
commit1b9d60f9851459c00a9d8a26afb74c9ffc4881fe (patch)
tree65eb5a9cdd19228daf32e8df05c7b19f5bee90aa
parent45d6baac4d371d4ed709babcdd2d43438c438bb7 (diff)
downloadNetworkManager-1b9d60f9851459c00a9d8a26afb74c9ffc4881fe.tar.gz
nm-glib: remove G_GNUC_EXTENSION
We use statement expressions all over the place without explicitly marking them. If that would be a problem, we'd have to change a *lot* of code. We simply require that as a mandatory feature from our compiler.
-rw-r--r--libnm-util/nm-gvaluearray-compat.h22
-rw-r--r--shared/nm-utils/nm-glib.h12
2 files changed, 17 insertions, 17 deletions
diff --git a/libnm-util/nm-gvaluearray-compat.h b/libnm-util/nm-gvaluearray-compat.h
index 424e6be78d..91f4f243a6 100644
--- a/libnm-util/nm-gvaluearray-compat.h
+++ b/libnm-util/nm-gvaluearray-compat.h
@@ -21,21 +21,21 @@
#define __NM_GVALUEARRAY_COMPAT_H__
#define g_value_array_get_type() \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
g_value_array_get_type (); \
G_GNUC_END_IGNORE_DEPRECATIONS \
})
#define g_value_array_get_nth(value_array, index_) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
g_value_array_get_nth (value_array, index_); \
G_GNUC_END_IGNORE_DEPRECATIONS \
})
#define g_value_array_new(n_prealloced) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
g_value_array_new (n_prealloced); \
G_GNUC_END_IGNORE_DEPRECATIONS \
@@ -44,7 +44,7 @@
static inline void
__g_value_array_free (GValueArray *value_array)
{
- G_GNUC_EXTENSION ({
+ ({
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_value_array_free (value_array);
G_GNUC_END_IGNORE_DEPRECATIONS
@@ -53,49 +53,49 @@ __g_value_array_free (GValueArray *value_array)
#define g_value_array_free __g_value_array_free
#define g_value_array_copy(value_array) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
g_value_array_copy (value_array); \
G_GNUC_END_IGNORE_DEPRECATIONS \
})
#define g_value_array_prepend(value_array, value) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
g_value_array_prepend (value_array, value); \
G_GNUC_END_IGNORE_DEPRECATIONS \
})
#define g_value_array_append(value_array, value) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
g_value_array_append (value_array, value); \
G_GNUC_END_IGNORE_DEPRECATIONS \
})
#define g_value_array_insert(value_array, index_, value) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
g_value_array_insert (value_array, index_, value); \
G_GNUC_END_IGNORE_DEPRECATIONS \
})
#define g_value_array_remove(value_array, index_) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
g_value_array_remove (value_array, index_); \
G_GNUC_END_IGNORE_DEPRECATIONS \
})
#define g_value_array_sort(value_array, compare_func) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
g_value_array_sort (value_array, compare_func); \
G_GNUC_END_IGNORE_DEPRECATIONS \
})
#define g_value_array_sort_with_data(value_array, compare_func, user_data) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
g_value_array_sort_with_data (value_array, compare_func, user_data); \
G_GNUC_END_IGNORE_DEPRECATIONS \
diff --git a/shared/nm-utils/nm-glib.h b/shared/nm-utils/nm-glib.h
index a014e26066..b9fc5c298d 100644
--- a/shared/nm-utils/nm-glib.h
+++ b/shared/nm-utils/nm-glib.h
@@ -313,14 +313,14 @@ _g_key_file_save_to_file (GKeyFile *key_file,
#if GLIB_CHECK_VERSION (2, 36, 0)
#define g_credentials_get_unix_pid(creds, error) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
(g_credentials_get_unix_pid) ((creds), (error)); \
G_GNUC_END_IGNORE_DEPRECATIONS \
})
#else
#define g_credentials_get_unix_pid(creds, error) \
- G_GNUC_EXTENSION ({ \
+ ({ \
struct ucred *native_creds; \
\
native_creds = g_credentials_get_native ((creds), G_CREDENTIALS_TYPE_LINUX_UCRED); \
@@ -357,12 +357,12 @@ _nm_g_hash_table_get_keys_as_array (GHashTable *hash_table,
#endif
#if !GLIB_CHECK_VERSION(2, 40, 0)
#define g_hash_table_get_keys_as_array(hash_table, length) \
- G_GNUC_EXTENSION ({ \
+ ({ \
_nm_g_hash_table_get_keys_as_array (hash_table, length); \
})
#else
#define g_hash_table_get_keys_as_array(hash_table, length) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
(g_hash_table_get_keys_as_array) ((hash_table), (length)); \
G_GNUC_END_IGNORE_DEPRECATIONS \
@@ -412,12 +412,12 @@ _nm_g_strv_contains (const gchar * const *strv,
#endif
#if !GLIB_CHECK_VERSION(2, 44, 0)
#define g_strv_contains(strv, str) \
- G_GNUC_EXTENSION ({ \
+ ({ \
_nm_g_strv_contains (strv, str); \
})
#else
#define g_strv_contains(strv, str) \
- G_GNUC_EXTENSION ({ \
+ ({ \
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
(g_strv_contains) ((strv), (str)); \
G_GNUC_END_IGNORE_DEPRECATIONS \