Drop "volatile" for g_once_init_enter locations

This fixes a few (fatal in gcc 11) warnings, breaking the CI.

For the original discussion on why this change is needed, see
https://gitlab.gnome.org/GNOME/glib/-/issues/600
This commit is contained in:
Niels De Graef 2021-05-02 16:57:13 +02:00 committed by Daiki Ueno
parent dfcfd2e0a2
commit 2c2b0abef7

View File

@ -64,7 +64,7 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL;
void void
egg_libgcrypt_initialize (void) egg_libgcrypt_initialize (void)
{ {
static volatile gsize gcrypt_initialized = 0; static size_t gcrypt_initialized = 0;
unsigned seed; unsigned seed;
if (g_once_init_enter (&gcrypt_initialized)) { if (g_once_init_enter (&gcrypt_initialized)) {