Fix compilation with gcc 11

../gstajacommon.cpp: In function ‘GType gst_aja_audio_meta_api_get_type()’:
/usr/include/glib-2.0/glib/gatomic.h:113:19: error: argument 2 of ‘__atomic_load’ must not be a pointer to a ‘volatile’ type
  113 |     __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:260:7: note: in expansion of macro ‘g_atomic_pointer_get’
  260 |     (!g_atomic_pointer_get (location) &&                             \
      |       ^~~~~~~~~~~~~~~~~~~~
../gstajacommon.cpp:398:7: note: in expansion of macro ‘g_once_init_enter’
  398 |   if (g_once_init_enter(&type)) {
      |       ^~~~~~~~~~~~~~~~~
This commit is contained in:
Sebastian Dröge 2021-10-12 19:56:31 +03:00
parent 50d90f6dca
commit e2f1953fa7

View file

@ -393,7 +393,7 @@ bool gst_ntv2_video_format_is_quad(NTV2VideoFormat format) {
}
GType gst_aja_audio_meta_api_get_type(void) {
static volatile GType type;
static GType type;
if (g_once_init_enter(&type)) {
static const gchar *tags[] = {NULL};