mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gstautoconvert.c: fix clang warnings
clang 10 is complaining about incompatible types due to the glib typesystem. ``` gst-plugins-bad/gst/autoconvert/b5c3019@@gstautoconvert@sha/gstautoconvert.c.o' -c ../subprojects/gst-plugins-bad/gst/autoconvert/gstautoconvert.c ../subprojects/gst-plugins-bad/gst/autoconvert/gstautoconvert.c:898:8: error: incompatible pointer types passing 'typeof ((((void *)0))) *' (aka 'void **') to parameter of type 'GList **' (aka 'struct _GList **') [-Werror,-Wincompatible-pointer-types] if (!g_atomic_pointer_compare_and_exchange (&autoconvert->factories, NULL, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gatomic.h:192:44: note: expanded from macro 'g_atomic_pointer_compare_and_exchange' __atomic_compare_exchange_n ((atomic), &gapcae_oldval, (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \ ^~~~~~~~~~~~~~ 1 error generated. ``` Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1487>
This commit is contained in:
parent
5705301ed5
commit
26bbcae973
1 changed files with 3 additions and 3 deletions
|
@ -248,7 +248,7 @@ gst_auto_convert_set_property (GObject * object,
|
|||
GList *factories = g_value_get_pointer (value);
|
||||
factories = g_list_copy (factories);
|
||||
if (g_atomic_pointer_compare_and_exchange (&autoconvert->factories,
|
||||
NULL, factories))
|
||||
(GList *) NULL, factories))
|
||||
g_list_foreach (factories, (GFunc) g_object_ref, NULL);
|
||||
else
|
||||
g_list_free (factories);
|
||||
|
@ -895,8 +895,8 @@ gst_auto_convert_load_factories (GstAutoConvert * autoconvert)
|
|||
|
||||
g_assert (all_factories);
|
||||
|
||||
if (!g_atomic_pointer_compare_and_exchange (&autoconvert->factories, NULL,
|
||||
all_factories)) {
|
||||
if (!g_atomic_pointer_compare_and_exchange (&autoconvert->factories,
|
||||
(GList *) NULL, all_factories)) {
|
||||
gst_plugin_feature_list_free (all_factories);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue