mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics should be used instead. GCC 11 has started warning about using volatile with atomic operations. https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719 Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/238>
This commit is contained in:
parent
8b3340632c
commit
8d4a815577
1 changed files with 4 additions and 4 deletions
|
@ -155,7 +155,7 @@ fake_demuxer_class_init (FakeDemuxerClass * self_class)
|
||||||
GType
|
GType
|
||||||
fake_demuxer_get_type (void)
|
fake_demuxer_get_type (void)
|
||||||
{
|
{
|
||||||
static volatile gsize type = 0;
|
static gsize type = 0;
|
||||||
|
|
||||||
if (g_once_init_enter (&type)) {
|
if (g_once_init_enter (&type)) {
|
||||||
GType _type;
|
GType _type;
|
||||||
|
@ -275,7 +275,7 @@ fake_decoder_class_init (FakeDecoderClass * self_class)
|
||||||
GType
|
GType
|
||||||
fake_decoder_get_type (void)
|
fake_decoder_get_type (void)
|
||||||
{
|
{
|
||||||
static volatile gsize type = 0;
|
static gsize type = 0;
|
||||||
|
|
||||||
if (g_once_init_enter (&type)) {
|
if (g_once_init_enter (&type)) {
|
||||||
GType _type;
|
GType _type;
|
||||||
|
@ -411,7 +411,7 @@ fake_mixer_class_init (FakeMixerClass * self_class)
|
||||||
GType
|
GType
|
||||||
fake_mixer_get_type (void)
|
fake_mixer_get_type (void)
|
||||||
{
|
{
|
||||||
static volatile gsize type = 0;
|
static gsize type = 0;
|
||||||
|
|
||||||
if (g_once_init_enter (&type)) {
|
if (g_once_init_enter (&type)) {
|
||||||
GType _type;
|
GType _type;
|
||||||
|
@ -482,7 +482,7 @@ fake_src_class_init (FakeSrcClass * self_class)
|
||||||
GType
|
GType
|
||||||
fake_src_get_type (void)
|
fake_src_get_type (void)
|
||||||
{
|
{
|
||||||
static volatile gsize type = 0;
|
static gsize type = 0;
|
||||||
|
|
||||||
if (g_once_init_enter (&type)) {
|
if (g_once_init_enter (&type)) {
|
||||||
GType _type;
|
GType _type;
|
||||||
|
|
Loading…
Reference in a new issue