diff options
author | Matthew Waters <matthew@centricular.com> | 2021-03-19 17:31:51 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2021-03-19 17:31:51 +1100 |
commit | 10a461daf42ccc1675727c3946316bba26e1f3ae (patch) | |
tree | 4c98aaf561220df32cd522344f0b2a632adc8f5d | |
parent | 3b2f3939a477b0fcba3837a4e19f476a06cedc07 (diff) |
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-docs/-/merge_requests/150>
-rw-r--r-- | markdown/application-development/advanced/pipeline-manipulation.md | 2 | ||||
-rw-r--r-- | markdown/plugin-development/advanced/allocation.md | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/markdown/application-development/advanced/pipeline-manipulation.md b/markdown/application-development/advanced/pipeline-manipulation.md index c35b170..624ce9e 100644 --- a/markdown/application-development/advanced/pipeline-manipulation.md +++ b/markdown/application-development/advanced/pipeline-manipulation.md @@ -274,7 +274,7 @@ Here is the code: #include <gst/gst.h> static GMainLoop *loop; -static volatile gint counter; +static gint counter; static GstBus *bus; static gboolean prerolled = FALSE; static GstPad *sinkpad; diff --git a/markdown/plugin-development/advanced/allocation.md b/markdown/plugin-development/advanced/allocation.md index 80c8679..bdff786 100644 --- a/markdown/plugin-development/advanced/allocation.md +++ b/markdown/plugin-development/advanced/allocation.md @@ -287,7 +287,7 @@ function is implemented in the `my-example-meta.c` file: GType my_example_meta_api_get_type (void) { - static volatile GType type; + static GType type; static const gchar *tags[] = { "foo", "bar", NULL }; if (g_once_init_enter (&type)) { |