diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2020-11-11 19:14:25 +0000 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2020-11-20 14:40:19 +0000 |
commit | eee7e3c6688f2f1ee9beed5d6d209973c1df387e (patch) | |
tree | 4ea32588758754396737182b79845754d12d8290 | |
parent | 08d04d0428cc26935a2d42083f1710432465c98a (diff) | |
download | glib-eee7e3c6688f2f1ee9beed5d6d209973c1df387e.tar.gz |
gmessages: Drop unnecessary volatile qualifiers from macro variables
It’s not necessary and provides no thread safety guarantees.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #600
-rw-r--r-- | glib/gmessages.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glib/gmessages.h b/glib/gmessages.h index 6a28443b4..2e3650baf 100644 --- a/glib/gmessages.h +++ b/glib/gmessages.h @@ -478,7 +478,7 @@ g_debug (const gchar *format, #if defined(G_HAVE_ISO_VARARGS) && !G_ANALYZER_ANALYZING #define g_warning_once(...) \ G_STMT_START { \ - static volatile int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; \ + static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \ if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \ 0, 1)) \ g_warning (__VA_ARGS__); \ @@ -487,7 +487,7 @@ g_debug (const gchar *format, #elif defined(G_HAVE_GNUC_VARARGS) && !G_ANALYZER_ANALYZING #define g_warning_once(format...) \ G_STMT_START { \ - static volatile int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; \ + static int G_PASTE (_GWarningOnceBoolean, __LINE__) = 0; /* (atomic) */ \ if (g_atomic_int_compare_and_exchange (&G_PASTE (_GWarningOnceBoolean, __LINE__), \ 0, 1)) \ g_warning (format); \ |