mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
structure,capsfeatures: Fix MSVC build warnings
Fixing warning "warning C4068: unknown pragma 'GCC'" Use portable GLib macro instead Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7589>
This commit is contained in:
parent
a0b561b492
commit
a8f8bbef99
2 changed files with 10 additions and 15 deletions
|
@ -405,10 +405,9 @@ gst_caps_features_new_id (GQuark feature1, ...)
|
||||||
g_return_val_if_fail (feature1 != 0, NULL);
|
g_return_val_if_fail (feature1 != 0, NULL);
|
||||||
|
|
||||||
va_start (varargs, feature1);
|
va_start (varargs, feature1);
|
||||||
#pragma GCC diagnostic push
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
features = gst_caps_features_new_id_valist (feature1, varargs);
|
features = gst_caps_features_new_id_valist (feature1, varargs);
|
||||||
#pragma GCC diagnostic pop
|
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||||
va_end (varargs);
|
va_end (varargs);
|
||||||
|
|
||||||
return features;
|
return features;
|
||||||
|
@ -437,10 +436,9 @@ gst_caps_features_new_id_valist (GQuark feature1, va_list varargs)
|
||||||
features = gst_caps_features_new_empty ();
|
features = gst_caps_features_new_empty ();
|
||||||
|
|
||||||
while (feature1) {
|
while (feature1) {
|
||||||
#pragma GCC diagnostic push
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
gst_caps_features_add_id (features, feature1);
|
gst_caps_features_add_id (features, feature1);
|
||||||
#pragma GCC diagnostic pop
|
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||||
feature1 = va_arg (varargs, GQuark);
|
feature1 = va_arg (varargs, GQuark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3860,10 +3860,9 @@ gst_structure_id_get_valist (const GstStructure * structure,
|
||||||
|
|
||||||
expected_type = va_arg (args, GType);
|
expected_type = va_arg (args, GType);
|
||||||
|
|
||||||
#pragma GCC diagnostic push
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
val = gst_structure_id_get_value (structure, field_id);
|
val = gst_structure_id_get_value (structure, field_id);
|
||||||
#pragma GCC diagnostic pop
|
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||||
|
|
||||||
if (val == NULL)
|
if (val == NULL)
|
||||||
goto no_such_field;
|
goto no_such_field;
|
||||||
|
@ -3892,15 +3891,14 @@ no_such_field:
|
||||||
}
|
}
|
||||||
wrong_type:
|
wrong_type:
|
||||||
{
|
{
|
||||||
#pragma GCC diagnostic push
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
GST_DEBUG ("Expected field '%s' in structure to be of type '%s', but "
|
GST_DEBUG ("Expected field '%s' in structure to be of type '%s', but "
|
||||||
"field was of type '%s': %" GST_PTR_FORMAT,
|
"field was of type '%s': %" GST_PTR_FORMAT,
|
||||||
g_quark_to_string (field_id),
|
g_quark_to_string (field_id),
|
||||||
GST_STR_NULL (g_type_name (expected_type)),
|
GST_STR_NULL (g_type_name (expected_type)),
|
||||||
G_VALUE_TYPE_NAME (gst_structure_id_get_value (structure, field_id)),
|
G_VALUE_TYPE_NAME (gst_structure_id_get_value (structure, field_id)),
|
||||||
structure);
|
structure);
|
||||||
#pragma GCC diagnostic pop
|
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4020,10 +4018,9 @@ gst_structure_id_get (const GstStructure * structure, GQuark first_field_id,
|
||||||
g_return_val_if_fail (first_field_id != 0, FALSE);
|
g_return_val_if_fail (first_field_id != 0, FALSE);
|
||||||
|
|
||||||
va_start (args, first_field_id);
|
va_start (args, first_field_id);
|
||||||
#pragma GCC diagnostic push
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
ret = gst_structure_id_get_valist (structure, first_field_id, args);
|
ret = gst_structure_id_get_valist (structure, first_field_id, args);
|
||||||
#pragma GCC diagnostic pop
|
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue