autoconvert: fix compiler warnings with g_atomic on recent GLib versions
authorTim-Philipp Müller <tim@centricular.com>
Fri, 1 May 2020 13:43:55 +0000 (14:43 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 1 May 2020 13:50:58 +0000 (14:50 +0100)
The volatile is not needed here and causes compiler warnings
with newer GLib versions.

gstautoconvert.c: In function ‘gst_auto_convert_dispose’ (and elsewhere):
glib/gatomic.h:108:3: warning: initialization discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
gstautoconvert.c:224:24: note: in expansion of macro ‘g_atomic_pointer_get’
  224 |     GList *factories = g_atomic_pointer_get (&autoconvert->factories);

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1237>

gst/autoconvert/gstautoconvert.h

index ae40e63eef152219ac7852dfbb8a5d22ebb4f9a4..eaa4f02c93f2eb6d08b6f3a3c9c15a8f880befef 100644 (file)
@@ -41,7 +41,7 @@ struct _GstAutoConvert
   /*< private >*/
   GstBin bin;                   /* we extend GstBin */
 
-  volatile GList *factories;
+  GList *factories;
 
   GstPad *sinkpad;
   GstPad *srcpad;