diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2020-11-11 18:40:56 +0000 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2020-11-20 14:40:19 +0000 |
commit | 1314ff93fc4d3379483c33da6a7deff27f71ed95 (patch) | |
tree | bd9ff393bbfe9ed27e0dfff63f04c84fbfe3cd72 /glib/gregex.c | |
parent | 9474655eb21d64519b293e780bb686976cbdb790 (diff) | |
download | glib-1314ff93fc4d3379483c33da6a7deff27f71ed95.tar.gz |
glib: Drop unnecessary volatile qualifiers from internal variables
These variables were already (correctly) accessed atomically. The
`volatile` qualifier doesn’t help with that.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #600
Diffstat (limited to 'glib/gregex.c')
-rw-r--r-- | glib/gregex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/glib/gregex.c b/glib/gregex.c index 52416bbb9..5e6ddfb46 100644 --- a/glib/gregex.c +++ b/glib/gregex.c @@ -203,7 +203,7 @@ G_STATIC_ASSERT (G_REGEX_RAW == PCRE_UTF8); struct _GMatchInfo { - volatile gint ref_count; /* the ref count */ + gint ref_count; /* the ref count (atomic) */ GRegex *regex; /* the regex */ GRegexMatchFlags match_opts; /* options used at match time on the regex */ gint matches; /* number of matching sub patterns */ @@ -218,7 +218,7 @@ struct _GMatchInfo struct _GRegex { - volatile gint ref_count; /* the ref count for the immutable part */ + gint ref_count; /* the ref count for the immutable part (atomic) */ gchar *pattern; /* the pattern */ pcre *pcre_re; /* compiled form of the pattern */ GRegexCompileFlags compile_opts; /* options used at compile time on the pattern */ @@ -1300,7 +1300,7 @@ g_regex_new (const gchar *pattern, pcre *re; const gchar *errmsg; gboolean optimize = FALSE; - static volatile gsize initialised = 0; + static gsize initialised = 0; g_return_val_if_fail (pattern != NULL, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); |